summaryrefslogtreecommitdiff
path: root/mem
diff options
context:
space:
mode:
Diffstat (limited to 'mem')
-rw-r--r--mem/jtag_uart.hex2
-rw-r--r--mem/mem.hex27
2 files changed, 25 insertions, 4 deletions
diff --git a/mem/jtag_uart.hex b/mem/jtag_uart.hex
index 7b08c66..efe4169 100644
--- a/mem/jtag_uart.hex
+++ b/mem/jtag_uart.hex
@@ -1,3 +1,5 @@
1@0 1@0
2 2
348 65 6c 6c 6f 2c 20 46 50 47 41 21 0d 0a
4
300 500
diff --git a/mem/mem.hex b/mem/mem.hex
index 84caf6d..8619b48 100644
--- a/mem/mem.hex
+++ b/mem/mem.hex
@@ -9,20 +9,32 @@
9000 // fib0: j: 0 # fib[n]; clobbered by ascii printer for inner loop index 9000 // fib0: j: 0 # fib[n]; clobbered by ascii printer for inner loop index
10000 // fib1: x: 0 # fib[n+1]; clobbered by ascii printer for digit being printed 10000 // fib1: x: 0 # fib[n+1]; clobbered by ascii printer for digit being printed
11000 // fib2: 0 # fib[n+2] 11000 // fib2: 0 # fib[n+2]
12116 // start: acc= @fib # for the toy indirect jump to fib 12116 // start: acc= @echo # for the toy indirect jump to fib
13306 // store @fib0 13307 // store @x
14170 // acc= 0x70 14170 // acc= 0x70
15301 // store @i 15301 // store @i
16001 // loop: cla 16001 // loop: cla
17281 // ladd i @i 17281 // ladd i @i
18400 // ifeq 0 18400 // ifeq 0
19586 // jmp i @fib0 # toy indirect jump to fib 19587 // jmp i @x # toy indirect jump to fib
20040 // tx 20040 // tx
21003 // cla ++acc 21003 // cla ++acc
22201 // ladd @i 22201 // ladd @i
23301 // store @i 23301 // store @i
24577 // jmp loop 24577 // jmp loop
25301 // fib: store @i # zero, it is known 25080 // echo: rx
2640a // ifeq 0x0a
27504 // jmp fib
2840d // ifeq 0x0d
29502 // jmp fib
30040 // tx
31579 // jmp echo
3210d // fib: acc= 0x0d
33040 // tx
3410a // acc= 0x0a
35040 // tx
36001 // cla
37301 // store @i
26370 // store 0x70 # 0x70 is now beginning of Fibonacci sequence (0) 38370 // store 0x70 # 0x70 is now beginning of Fibonacci sequence (0)
27003 // cla ++acc 39003 // cla ++acc
28371 // store 0x71 # 0x71 is 1 40371 // store 0x71 # 0x71 is 1
@@ -101,6 +113,13 @@
10106c // l 11306c // l
102064 // d 114064 // d
103021 // ! 115021 // !
11600d // \r
10400a // \n 11700a // \n
118045 // E
119063 // c
120068 // h
12106f // o
12203a // :
123020 // ' '
105 124
106000 125000