36 ;r0 ... lut address (can be overwritten)
37 ;r1 ... address to input, every byte is a new input
38 ; includes pc implicitly
39 ;r3 ... effective stack address
42 ;decrement address to input by 1
44 ;load base address of stack
50 ;increment input address
54 ;we need to multiply input by 4 to get correct address offset
56 ;calc position in jumptable
83 ;check if sp-1 is even or odd
87 ;if odd decrement sp-1
89 ;just to get zero flag unset
93 ;add to sp-1 to result
141 ;case 0 1 2 3 4 5 6 7 8 9
149 ;increment stack addr
166 ;compare sp-1 with sp
168 ;set r8 to -1 if less than
184 ;increment stack addr
211 ;store result to stack
230 ;increment pc if == 0
234 ;set r6 to 0 (to clear upper bytes)
238 ;compare input with neg. max of 8 bit
251 ;decrement stack addr
327 .fill 129, vm_default