home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!mips!sdd.hp.com!usc!elroy.jpl.nasa.gov!jato!jdickson
- From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
- Subject: Re: Assembler programming.
- Message-ID: <1992Aug21.220718.24365@jato.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory
- References: <14448@mindlink.bc.ca> <64374@cup.portal.com>
- Date: Fri, 21 Aug 1992 22:07:18 GMT
- Lines: 33
-
- In article <64374@cup.portal.com> Aurelius@cup.portal.com (Mark Christian Barnes) writes:
- >Charlie Gibbs writes:
- >
- >|>That's strange. I have a book on the 68000 (by Sybex I think) that
- >|>states that address indirect with index and address indirect with index and
- >|>displacement are two seperate addressing modes. This is news to me.
- >|
- >Paragraph 2.11.2.5: Address Register Indirect with Index
- >
- > ... The address of the operand is the sum of the address in the
- >address register, the sign-extended displacement integer in the
- >low order eight bits of the extension word, and the contents of
- >the index register...
- >
- > SYNTAX: d8(An, Xn.W), or (d8, An, Xn.W)
- > d8(An, Xn.L), or (d8, An, Xn.L)
- >
- >So, I would say that Charlie is correct in saying that the
- >displacement is always present in these two addressing modes.
- >However the word "displacement" is not in the title of both,
- >at least not in my old, official tome, published in 1986 ;-].
- >
- > Regards, Aurelius@cup.portal.com
-
- I stand corrected. Quite unnerving to think that in situations where address
- register indirect with index type addressing is used (i.e. null terminating
- a string: move.b #0,(a0,d0.w) ) requires an additional memory read _just_
- to find out that the displacement value wasn't given (zero). The assembler I
- use obviously assumes a zero displacement value in the event I don't specify
- one, because it doesn't complain.
-
- jeff
-
-