about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/calls.subx4
-rw-r--r--apps/mulisp.subx18
2 files changed, 9 insertions, 13 deletions
diff --git a/apps/calls.subx b/apps/calls.subx
index 89b67cf6..a7e3bd57 100644
--- a/apps/calls.subx
+++ b/apps/calls.subx
@@ -248,8 +248,8 @@ parse-line:  # line : (address stream byte), words : (address stream slice)
     # . save registers
     51/push-ecx
     # var word-slice/ecx : (address slice) = {0, 0}
-    68/push 0/imm32
-    68/push 0/imm32
+    68/push 0/imm32/end
+    68/push 0/imm32/start
     89/<- %ecx 4/r32/esp
 $parse-line:loop:
     # word-slice = next-word-string-or-expression-without-metadata(line)
diff --git a/apps/mulisp.subx b/apps/mulisp.subx
index 015bd181..92803e97 100644
--- a/apps/mulisp.subx
+++ b/apps/mulisp.subx
@@ -7,10 +7,6 @@
 #   => 42
 #   ^D
 #   $
-#
-# Or, for emulated mode (veeery slow):
-#   $ cat 0*.subx apps/mulisp.subx  |  ./subx run apps/desugar > a.desugar
-#   $ ./subx translate a.desugar -o a.elf
 
 == code
 
@@ -39,8 +35,8 @@ $main:end:
     b8/copy-to-eax 1/imm32/exit
     cd/syscall 0x80/imm8
 
-# type val = nil | num | char | symbol | pair | array
-#     tag:    0     1     2       3       4       5
+# type cell = nil | num | char | symbol | pair | array | stream
+#     tag:    0     1     2       3       4       5       6
 # numbers start with a digit and are always in hex
 # characters start with a backslash
 # pairs start with '('
@@ -54,12 +50,12 @@ repl:  # in : (address buffered-file), out : (address buffered-file) -> <void>
     # . save registers
     50/push-eax
 $repl:loop:
-    (lisp-read Stdin)  # => eax
+    (lisp-read Stdin)  # => eax : (address cell)
     # if (eax == 0) break
     3d/compare-eax-and 0/imm32
     74/jump-if-equal $repl:end/disp8
     #
-    (lisp-eval %eax)  # => eax
+    (lisp-eval %eax)  # => eax : (address cell)
     (lisp-print Stdout %eax)
     # loop
     eb/jump $repl:loop/disp8
@@ -71,7 +67,7 @@ $repl:end:
     5d/pop-to-ebp
     c3/return
 
-lisp-read:  # in : (address buffered-file) -> eax : (address val)
+lisp-read:  # in : (address buffered-file) -> eax : (address cell)
     # . prolog
     55/push-ebp
     89/<- %ebp 4/r32/esp
@@ -102,7 +98,7 @@ $lisp-read:end:
     5d/pop-to-ebp
     c3/return
 
-lisp-eval:  # in : (address val) -> eax : (address val)
+lisp-eval:  # in : (address cell) -> eax : (address cell)
     # . prolog
     55/push-ebp
     89/<- %ebp 4/r32/esp
@@ -115,7 +111,7 @@ $lisp-eval:end:
     5d/pop-to-ebp
     c3/return
 
-lisp-print:  # out : (address buffered-file), x : (address val)
+lisp-print:  # out : (address buffered-file), x : (address cell)
     # . prolog
     55/push-ebp
     89/<- %ebp 4/r32/esp