SPRUIY2A November 2024 – March 2025 F29H850TU , F29H859TU-Q1
This is a 5-bit field for indirect encoding of addresses that can be used in all "Pointer Addressing" modes.
Table 4-3 shows the various ways the 5 bits can be used to encode the address.
| ADDR2 Field: (Az = A4 to A7) | |||||||
|---|---|---|---|---|---|---|---|
| Mnemonic | Shorthand | Address Generation | 4 | 3 | 2 | 1 | 0 |
| *(Az++A0) | *Az++A0 | addr = Az, Az = Az + A0 | 0 | 0 | 0 | Az[4-7] | |
| *(Az++A1) | *Az++A1 | addr = Az, Az = Az + A1 | 0 | 0 | 1 | Az[4-7] | |
| *(Az+A0<<#scale) | *Az[A0] | addr = Az + A0 << (0/1/2/3) (1) | 0 | 1 | 0 | Az[4-7] | |
| *(Az+A1<<#scale) | *Az[A1] | addr = Az + A1 << (0/1/2/3) (1) | 0 | 1 | 1 | Az[4-7] | |
| *Az | *Az | addr = Az | 1 | 0 | 0 | Az[4-7] | |
| *(Az++#size) | *Az++ | addr = Az, Az = Az + (1/2/4/8) (#size = 1,2,4,8) (1) | 1 | 0 | 1 | Az[4-7] | |
| *(Az--#size) | *Az-- | addr = Az, Az = Az – (1/2/4/8) (#size = 1,2,4,8) (1) | 1 | 1 | 0 | Az[4-7] | |
| *(Az-=#size) | *--Az | Az = Az – (1/2/4/8), addr = Az (#size = 1,2,4,8) (1) | 1 | 1 | 1 | Az[4-7] | |
The following are the instructions that can use the ADDR2 field:
AND.32, ANDOR, LD.32, LD.64, MV.16, MV.32, MV.64, MV.8, OR.32, ST.16, ST.32, ST.64, ST.8, XOR.32
Examples:
; Register XMx is loaded with the 64-bit word at the memory location
; addressed using the ADDR2 addressing mode. This address is fetched from Az.
LD.64 XMx,ADDR2 ; field
LD.64 XMx,*Az ; addressing mode
LD.64 XM4,*A4 ; actual assembly code
; The 8-bit immediate value specified is stored at the memory location
; addressed using the ADDR2 addressing mode. The address is fetched from Az,
; which is then post-decremented by the amount in #size. The #size is
; automatically chosen by the CPU to be 1 since the word size accessed by
; this instruction is 8-bit.
ST.8 ADDR2,#0x0B ; field
ST.8 *(Az--#size),#0x0B ; addressing mode
ST.8 *(Az--#1),#0x0B ; actual assembly