.pos 0x100
foo: gpc $6, r6 # r6 = pc + 6
j ping # call ping()
ld $5, r0
ld $x, r1
st r0, (r1) # x = 5
halt # halt
.pos 0x400
ping: ld $10, r2
gpc $6,r6 # r6 = pc + 6
j pong # call pong()
j (r6) # return
.pos 0x600
pong: ld $20, r3
j (r6) # return
.pos 0x1000
x: .long 0x0 # x
i: .long 0x0 # i
.pos 0x3000
stackTop: .long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x00000000
.long 0x00000000
stackBtm: .long 0x00000000