aboutsummaryrefslogtreecommitdiff
path: root/examples/ique_fibonacci.asm
blob: a7f13e43b2a5c3caa04eb9ab2499903be6b0beb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; http://www.reddit.com/r/dcpu_16_programming/comments/rtvnp/i_wrote_a_program_that_fills_up_the_memory_with/

SET A, 1
SET B, 1
SET PEEK, 1
:loop ADD A, B   ;  A is now 2, B is still 1
SET PUSH, A
SET A, B
SET B, PEEK
IFG SP, 10       ; 10 because that's how much space 
                 ; this program takes 
SET PC, loop