37 lines
462 B
Text
37 lines
462 B
Text
push 1
|
|
not
|
|
in(number)
|
|
duplicate
|
|
not // label a
|
|
pointer // pointer 1
|
|
duplicate
|
|
push 1
|
|
subtract
|
|
push 1
|
|
pointer
|
|
push 1
|
|
noop
|
|
pointer
|
|
duplicate // the next op is back at label a
|
|
|
|
push 1 // this part continues from pointer 1
|
|
noop
|
|
push 2 // label b
|
|
push 1
|
|
rot 1 2
|
|
duplicate
|
|
not
|
|
pointer // pointer 2
|
|
multiply
|
|
push 3
|
|
pointer
|
|
push 3
|
|
pointer
|
|
push 3
|
|
push 3
|
|
pointer
|
|
pointer // back at label b
|
|
|
|
pop // continues from pointer 2
|
|
out(number)
|
|
exit
|