about summary refs log tree commit diff stats
path: root/mu.arc
diff options
context:
space:
mode:
Diffstat (limited to 'mu.arc')
-rw-r--r--mu.arc8
1 files changed, 6 insertions, 2 deletions
diff --git a/mu.arc b/mu.arc
index 27b5fd9f..f8807296 100644
--- a/mu.arc
+++ b/mu.arc
@@ -8,7 +8,7 @@
   (each (name . body) fns
     (= function*.name body)))
 
-(def run (instrs (o returned))
+(def run (instrs (o fn-args) (o returned))
   (each instr instrs
     (unless returned
 ;?       (prn instr)
@@ -23,10 +23,14 @@
             add
               (= (memory* oarg.0)
                  (+ (memory* arg.0) (memory* arg.1)))
+            read
+              (= (memory* oarg.0)
+                 ; hardcoded channel for now
+                 (memory* pop.fn-args))
             return
               (set returned)
             ; else user-defined function
-              (run function*.op)
+              (run function*.op arg)
             )))))
 ;?   (prn "return")
   )