R2 = memw(##100000) // load R2 with word from addr 100000
memw(##200000) = R4 // store R4 to word at addr 200000
绝对偏移寻址
绝对偏移寻址模式将32位的常数对其至指定的通用寄存器,然后使用该值作为有效的内存地址。例如:
R2 = memw(R1=##400000) // load R2 with word from addr 400000
// and load R1 with value 400000
memw(R3=##600000) = R4 // store R4 to word at addr 600000
// and load R3 with value 600000
寄存器绝对偏移寻址
R2 = memw(R0++M1) // The effective addr is the value of R0.
// Next, M1 is added to R0 and the result
// is stored in R0.
在使用自增的寄存器是,增加的值是一个有符号的32位数值,该数值被自动加上通用寄存器中。这使得自增立即数寻址有如下两个优点:
R0 = memb(R2++#4:circ(M0)) // load from R2 in circ buf specified
// by M0
memw(R2++#8:circ(M1)) = R0 // store to R2 in circ buf specified
// by M1
循环寻址可通过编写如下元素来设置:
R2 = memub(R0++M1:brev) // The address is (R0.H | bitrev(R0.L))
// The orginal R0 (not reversed) is added
// to M1 and written back to R0
寻址的地址初始值必须在位反转的格式中定义,通过硬件反转位反转的值来构建有效内存地址。