diff options
| author | Julian Blake Kongslie | 2021-03-29 13:59:45 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2021-03-29 13:59:45 -0700 |
| commit | 135fbf911740e88b802d340fe3e747dd39966ec4 (patch) | |
| tree | 9f3bf2b39e4b71ca4169ccb45f332b1a33551887 /mem | |
| parent | Trivial cleanup of initial memory image. (diff) | |
| download | noncpu-135fbf911740e88b802d340fe3e747dd39966ec4.tar.xz | |
Trivial assembler.
Diffstat (limited to '')
| -rw-r--r-- | mem/mem.hex | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/mem/mem.hex b/mem/mem.hex index 9cd9433..5c6ebe7 100644 --- a/mem/mem.hex +++ b/mem/mem.hex | |||
| @@ -1,15 +1,12 @@ | |||
| 1 | @0 | 1 | @0 |
| 2 | 2 | ||
| 3 | 040 // %acc = 0x40 | 3 | 040 // acc= 0x40 |
| 4 | f20 // %idx = %acc | 4 | f20 // idx |
| 5 | 5 | 100 // loop: load | |
| 6 | // loop: | 6 | 300 // ifeq 0 |
| 7 | 100 // %acc = [%idx] | 7 | f80 // halt |
| 8 | 300 402 // if (%acc == 0) { %pc = exit } | 8 | f44 // ++idx tx |
| 9 | f44 // ++%idx; tx %acc | 9 | 4fb // jmp loop |
| 10 | 4fb // jmp loop | ||
| 11 | |||
| 12 | f80 // hcf | ||
| 13 | 10 | ||
| 14 | @40 | 11 | @40 |
| 15 | 12 | ||
