The first field, value, is an integer
The second field, next, is a pointer to the next node
R7 contains a pointer to a node
Which instruction performs R8 := *R7.next?
The first field, value, is an integer
The second field, next, is a pointer to the next node
R7 contains a pointer to a node (assume that R7 is not nil)
Which instruction performs R8 := *R7.value?
Suppose p is a pointer to a list, and we need to implement
if p=nil then goto aardvark
This is implemented by
following sequence of operations:
push a, push b, push c, pop, push d, push e, pop, pop, pop
What value is returned by the last pop?
needs to save the return address in memory to avoid
destroying the return address.
Suppose this program fragment executes:
labela add R4,R5,R6
labelb sub R2,R8,R3
labelc jal R13,labelf[R0]
labeld mul R9,R2,R4
labele lea R3,a[R0]
labelf add R4,R7,R2
After it executes, the value in R13 is