diff options
Diffstat (limited to 'mu.arc')
-rw-r--r-- | mu.arc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mu.arc b/mu.arc new file mode 100644 index 00000000..3c02fcec --- /dev/null +++ b/mu.arc @@ -0,0 +1,20 @@ +(= types* (table)) +(= memory* (table)) + +(def run (instrs) + (each instr instrs +;? (prn instr) + (let (oarg1 <- op arg1 arg2) instr +;? (prn op) + (case op + loadi + (= memory*.oarg1 arg1) + add + (= memory*.oarg1 + (+ memory*.arg1 memory*.arg2)) + )))) + +(each file (cut argv 1) +;? (prn file) + (run readfile.file) + (prn memory*)) |