Please note, I will need to clean up the assembly code once I write an assembler.
Load 15 Add 14 Output Halt
0x1f 0x2e 0xe0 0xf0 0 0 0 0 0 0 0 0 0 0 12 30
Load 15 Add 14 Sub 13 Output Halt
0x1f 0x2e 0x3d 0xe0 0xf0 0 0 0 0 0 0 0 10 12 30
LoadI 3 Store 15 LoadI 0 Add 15 out Jump 3
0x53 0x4f 0x50 0x2f 0xe0 0x63
out add 15 jumpC 4 jump 0 sub 15 out jumpz 0 jump 4 15: 1
0xe0 0x2f 0x74 0x60 0x3f 0xe0 0x80 0x64 0 0 0 0 0 0 0 1
load 14 subtract 12 jumpc 6 load 13 output halt store 14 load 13 add 15 store 13 jump 0 12: 1 13: 0 14: 12 15: 5
0x1e 0x3c 0x76 0x1d 0xe0 0xf0 0x4e 0x1d 0x2f 0x4d 0x60 0 1 0 12 5
x = 1 y = 0 while no overflow x = x + y tmp = x + y // just to cause overflow before next computation
loadI 1 store 14 loadI 0 store 15 out load 14 add 15 store 14 out load 15 add 14 jumpc 13 jump 3 halt
0x51 0x4e 0x50 0x4f 0xe0 0x1e 0x2f 0x4e 0xe0 0x1f 0x2e 0x7d 0x63 0xf0