home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!nntp1.radiomail.net!portal!cup.portal.com!Aurelius
- From: Aurelius@cup.portal.com (Mark Christian Barnes)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Assembler programming.
- Message-ID: <64503@cup.portal.com>
- Date: Sun, 23 Aug 92 12:37:14 PDT
- Organization: The Portal System (TM)
- Distribution: world
- References: <14448@mindlink.bc.ca> <64374@cup.portal.com>
- <1992Aug21.220718.24365@jato.jpl.nasa.gov>
- Lines: 39
-
- <stuff deleted>
-
- |>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)
- |>
- |> 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
-
- Not exactly Jeff, Indirect with Index addressing takes *one* extension
- word. This is in addition to the opcode word. The high byte of the
- extension word specifies the index register and its size. The low byte
- is the displacement integer, which will be signed extended.
-
- Although, :-), on the 68020+ processors, the displacement can be 8,
- 16, or 32 bits. The 8 bit form is what I have described. The 16 and
- 32 bit forms *do* have to read *two* extension words, as you feared.
-
- Regards, Aurelius@cup.portal.com
-
- PS: Always use legal syntax. Assemblers may allow you to save
- a little typing (and thinking) by permitting degenerate
- forms (like your example) or aliases (like MOVE x,An
- instead of MOVEA x,An), but it can just lead to confusion
- in the long run.
-