From 135fbf911740e88b802d340fe3e747dd39966ec4 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Mon, 29 Mar 2021 13:59:45 -0700 Subject: Trivial assembler. --- mem/mem.hex | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'mem/mem.hex') 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 @@ @0 -040 // %acc = 0x40 -f20 // %idx = %acc - -// loop: -100 // %acc = [%idx] -300 402 // if (%acc == 0) { %pc = exit } -f44 // ++%idx; tx %acc -4fb // jmp loop - -f80 // hcf +040 // acc= 0x40 +f20 // idx +100 // loop: load +300 // ifeq 0 +f80 // halt +f44 // ++idx tx +4fb // jmp loop @40 -- cgit v1.2.3