Академический Документы
Профессиональный Документы
Культура Документы
Oprnd = Mem[Mem[OprndSpec]]
With indirect addressing, the operand specifier is the address in
memory of the address of the operand. The compiler translates the
assignment statement as
0012 C00005 LDWA 5,i ;*a = 5
0015 E20003 STWA a,n
Mem[Mem[OprndSpec]]
Mem[Mem[0003]]
Mem[007F]
which is the first cell in the heap. The store word instruction stores 5 in
main memory at address 007F.
The compiler translates the assignment of global pointers the same
as it would translate the assignment of any other type of global
variable. It translates
c = a;
as
0027 C10003 LDWA a,d ;c = a
002A E10007 STWA c,d
as
0033 C00002 LDWA 2,i ;*a = 2 + *c
492