Answer A
f: push #4
ld [fp] -> %r0
ld [fp+16] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp+12]
ld [fp+12] -> %r0
add %r0, %gm1 -> %r0
ret
|
Answer B
f: push #4
ld [fp+12] -> %r0
ld [fp+16] -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ret
|
Answer C
f: push #4
ld [fp+12] -> %r0
st %r0 -> [sp]--
jsr h
pop #4
st %r0 -> [sp]--
ld [fp+16] -> %r0
st %r0 -> [sp]--
jsr g
pop #8
add %r0, %gm1 -> %r0
ret
|
Answer D
f: push #4
mov #12 -> %r0
add %r0, %fp -> %r0
st %r0 -> [sp]--
jsr h
pop #4
st %r0 -> [sp]--
ld [fp+16] -> %r0
st %r0 -> [sp]--
jsr g
pop #8
add %r0, %gm1 -> %r0
ret
|
Answer E
f: push #4
ld [fp+12] -> %r0
ld [fp+16] -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
add %r0, %gm1 -> %r0
ret
|
Answer F
f: push #4
ld [fp+12] -> %r0
ld [r0] -> %r0
ld [fp+16] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ret
|
Answer G
f: push #4
ld [fp] -> %r0
ld [fp+16] -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp+12]
ld [fp+12] -> %r0
add %r0, %gm1 -> %r0
ret
|
Answer H
f: push #4
ld [fp+12] -> %r0
ld [fp+16] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ret
|
Answer I
f: ld [fp+12] -> %r0
st %r0 -> [sp]--
jsr h
st %r0 -> [sp]--
ld [fp+16] -> %r0
st %r0 -> [sp]--
jsr g
add %r0, %gm1 -> %r0
ret
|
Answer J
f: push #4
st %r2 -> [sp]--
ld [fp+12] -> %r0
mov #4 -> %r1
add %r0, %r1 -> %r0
ld [r0] -> %r0
ld [fp] -> %r1
mov #4 -> %r2
mul %r1, %r2 -> %r1
ld [fp+16] -> %r2
add %r1, %r2 -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ld ++[sp] -> %r2
ret
|
Answer K
f: st %r2 -> [sp]--
push #4
ld [fp+12] -> %r0
mov #4 -> %r1
add %r0, %r1 -> %r0
ld [r0] -> %r0
ld [fp] -> %r1
mov #4 -> %r2
mul %r1, %r2 -> %r1
ld [fp+16] -> %r2
add %r1, %r2 -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ld ++[sp] -> %r2
ret
|
Answer L
f: push #4
st %r2 -> [sp]--
ld [fp+12] -> %r0
mov #4 -> %r1
add %r0, %r1 -> %r0
ld [fp] -> %r1
mov #4 -> %r2
mul %r1, %r2 -> %r1
ld [fp+16] -> %r2
add %r1, %r2 -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ld ++[sp] -> %r2
ret
|
Answer M
f: push #4
st %g0 -> [fp]
ld [fp] -> %r0
ld [fp+16] -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
ld [fp+12] -> %r1
st %r0 -> [r1]
ld [fp+12] -> %r0
ld [r0] -> %r0
add %r0, %gm1 -> %r0
ret
|
Answer N
f: mov #12 -> %r0
add %r0, %fp -> %r0
st %r0 -> [sp]--
jsr h
st %r0 -> [sp]--
ld [fp+16] -> %r0
st %r0 -> [sp]--
jsr g
add %r0, %gm1 -> %r0
ret
|
Answer O
f: st %r2 -> [sp]--
push #4
ld [fp+12] -> %r0
mov #4 -> %r1
add %r0, %r1 -> %r0
ld [fp] -> %r1
mov #4 -> %r2
mul %r1, %r2 -> %r1
ld [fp+16] -> %r2
add %r1, %r2 -> %r1
add %r0, %r1 -> %r0
st %r0 -> [fp]
ld [fp] -> %r0
add %r0, %gm1 -> %r0
ld [sp] -> 5r2
ret
|
Answer P
f: push #4
ld [fp] -> %r0
ld [fp+16] -> %r1
ld [r1] -> %r1
add %r0, %r1 -> %r0
ld [fp+12] -> %r1
st %r0 -> [r1]
ld [fp+12] -> %r0
ld [r0] -> %r0
add %r0, %gm1 -> %r0
ret
|