Yes, "off N8" is an addressing mode in 66k assembler. My disassembler tends to produce confusing output, but it outputs what it does so you more easily can see what's really going on.
When you use off(xx), the address is really #yyxx. The LRB register controls what the upper eight bits (yy) are. The latest version of the disassembler tracks this:
MOV LRB, #00021h ; 03E6 1 108 ??? 572100
The '108' is the LRB, or Local Register Base. It means that the registers r0-r7/er0-er4 are located at #0108 in RAM. It also means that off(xx) is located at #01xx. (The ??? in this case is in the USP, or user stack pointer, column, and means USP hasn't been set yet).
The 66k User's Manual documentation explains more about addressing modes, and how the bitfields inside LRB are broken down.
A full example is here:
MOV LRB, #00021h ; 03E6 1 108 ??? 572100
MOV USP, #00280h ; 03E9 1 108 280 A1988002
L A, (00212h-00280h)[USP] ; 03ED 1 108 280 E392
ST A, off(00112h) ; 03EF 1 108 280 D412
(0212h-0280h)[USP] = 92h[USP], which is the value that appears in a USP-relative addressing instruction; in this case the disassembler has predicted USP to be 0280 and thus the actual address being accessed is 0212h.
off(0112h) = off(12h), since the field is truncated to 8 bits. The disassembler has predicted the offset register to be 01xx, so the actual address being accessed here is 0112h.
[%sig%]
Post Edited (11-25-03 17:28)
|