@0 10d // acc= @fib # for the toy indirect jump to fib 369 // store 0x69 170 // acc= 0x70 36a // store 0x6a 001 // loop: cla 2ea // ladd i 0x6a 400 // ifeq 0 5e9 // jmp i 0x69 # toy indirect jump to fib 040 // tx 003 // cla ++acc 26a // ladd 0x6a 36a // store 0x6a 577 // jmp loop 36a // fib: store 0x6a # zero, it is known 370 // store 0x70 # 0x70 is now beginning of Fibonacci sequence (0) 003 // cla ++acc 371 // store 0x71 # 0x71 is 1 170 // fibloop: acc= 0x70 26a // ladd 0x6a 369 // store 0x69 001 // cla 2e9 // ladd i 0x69 # next fib number to print 66b // ascii 0x6b # LSB of ASCII rep 66c // ascii 0x6c 66d // ascii 0x6d 66e // ascii 0x6e # MSB of ASCII rep 104 // acc= 4 369 // store 0x69 005 // scan: cla --acc 269 // ladd 0x69 4ff // ifeq -1 508 // jmp print 369 // store 0x69 16b // acc= 0x6b 269 // ladd 0x69 368 // store 0x68 001 // cla 2e8 // ladd i 0x68 430 // ifeq 0x30 574 // jmp scan 16b // print: acc= 0x6b 269 // ladd 0x69 368 // store 0x68 001 // cla 2e8 // ladd i 0x68 040 // tx 005 // cla --acc 269 // ladd 0x69 4ff // ifeq -1 502 // jmp space 369 // store 0x69 574 // jmp print 120 // space: acc= 0x20 040 // tx 170 // acc= 0x70 26a // ladd 0x6a 369 // store 0x69 003 // cla ++acc 269 // ladd 0x69 # compute &fib[i+1] 368 // store 0x68 003 // cla ++acc 268 // ladd 0x68 # compute &fib[i+2] 367 // store 0x67 001 // cla 2e9 // ladd i 0x69 2e8 // ladd i 0x68 # compute fib[i+2] 3e7 // store i 0x67 # store it 003 // cla ++acc 26a // ladd 0x6a 432 // ifeq 50 502 // jmp fullydone 36a // store 0x6a 548 // jmp fibloop 121 // fullydone: acc= 0x21 040 // tx 080 // halt // 67: scratch (pointer to fib[i+2]) // 68: scratch (pointer to fib[i+1]) // 69: scratch (pointer to fib[i]) (j) // 6a: i // 6b: LSB of ASCII rep // 6c: USB of ASCII rep // 6d: USB of ASCII rep // 6e: MSB of ASCII rep @70 048 // H # later: start of in-memory Fib sequence 065 // e 06c // l 06c // l 06f // o 02c // , 020 // ' ' 077 // w 06f // o 072 // r 06c // l 064 // d 021 // ! 00a // \n 000