diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-07-11 21:58:33 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-07-11 21:58:33 -0700 |
commit | baccb5d569ddb9d835b1b837ab3139abe7bbde8d (patch) | |
tree | 514e9b6477f3a9bcd47408a8e63167558f054ad9 | |
parent | aa0ce16f8b1dc69912f43c9cc49d2e7302406aef (diff) | |
download | mu-baccb5d569ddb9d835b1b837ab3139abe7bbde8d.tar.gz |
18 - 'read' renamed to 'arg' and can take an index
-rw-r--r-- | mu.arc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/mu.arc b/mu.arc index 934d480c..67225100 100644 --- a/mu.arc +++ b/mu.arc @@ -54,18 +54,12 @@ (memory* oarg.1.1) (mod (memory* arg.0.1) (memory* arg.1.1))) arg -;? (do (prn "arg " arg " fn-arg " fn-arg-idx) - (if arg -;? (do (prn "arg " arg) - (= (memory* oarg.0.1) - (memory* ((fn-args arg.0) 1))) -;? ) -;? (do (prn "no arg; using " fn-arg-idx " " fn-args.fn-arg-idx) - (= (memory* oarg.0.1) - (memory* fn-args.fn-arg-idx.1)) - (++ fn-arg-idx)) -;? ) -;? ) + (let idx (if arg + arg.0 + (do1 fn-arg-idx + ++.fn-arg-idx)) + (= (memory* oarg.0.1) + (memory* fn-args.idx.1))) jmp (do (= pc arg.0.1) ;? (prn "jumping to " pc) |