All pastes #19192 Raw Edit

Untitled

public text v1 · immutable
#19192 ·published 2005-08-03 14:52 UTC
rendered paste body
// pushing -1 before starting execution (returnaddress)
// handling ret instruction by stack only (as in a continual)
// execution system that cannot simple "stop" (ie CPU or
// any other machine that executes in cylces by clock)

# fragment name=invokestatic0.asm, id=2

@0:
invokestatic 999
[invokestatic::push pc (1); set pc (@999)]

@999:
iconst 1121714176
iconst 1123024896
invokestatic 100
[invokestatic::push pc (18); set pc (@100)]

@100:
enter 2
load 1, -2
load 2, -3
fadd 1, 1, 2
storeresult 1
[hint::load/storeresult 230]
load -2
load -3
fadd 
storeresult 
[hint::load/storeresult 230]
leave 2
ret 2
[ret::cur pc (14); set pc (18)]
ret 
[ret::cur pc (19); set pc (1)]
ret 
[ret::cur pc (2); set pc (-1)]
# end of fragment


// status success: 0 results