diff options
| -rw-r--r-- | mem/mem.hex | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/mem/mem.hex b/mem/mem.hex index 3979364..63038e3 100644 --- a/mem/mem.hex +++ b/mem/mem.hex | |||
| @@ -1,28 +1,21 @@ | |||
| 1 | @0 | 1 | @0 |
| 2 | 2 | ||
| 3 | 040 // acc= 0x40 | ||
| 4 | f20 // idx | ||
| 5 | 000 // loop: acc= 0 | 3 | 000 // loop: acc= 0 |
| 6 | 100 // load | 4 | 140 // load 0x40 |
| 7 | 300 // ifeq 0 | 5 | 300 // ifeq 0 |
| 8 | 402 // jmp fib | 6 | 402 // jmp fib |
| 9 | f44 // ++idx tx | 7 | f44 // ++idx tx |
| 10 | 4fa // jmp loop | 8 | 4fa // jmp loop |
| 11 | 040 // fib: acc= 0x40 | 9 | f20 // fib: idx |
| 12 | f20 // idx | 10 | 240 // store 0x40 |
| 13 | 000 // acc= 0 | ||
| 14 | 200 // store | ||
| 15 | f04 // ++idx | ||
| 16 | 001 // acc= 1 | 11 | 001 // acc= 1 |
| 17 | 200 // store | 12 | 241 // store 0x41 |
| 18 | f08 // fibloop: --idx | 13 | 000 // fibloop: acc= 0 |
| 19 | 000 // acc= 0 | 14 | 140 // load 0x40 |
| 20 | 100 // load | 15 | f44 // tx ++idx |
| 21 | f44 // ++idx tx | 16 | 140 // load 0x40 |
| 22 | 100 // load | 17 | 241 // store 0x41 |
| 23 | f04 // ++idx | 18 | 4fa // jmp fibloop |
| 24 | 200 // store | ||
| 25 | 4f8 // jmp fibloop | ||
| 26 | 19 | ||
| 27 | @40 | 20 | @40 |
| 28 | 21 | ||
