about summary refs log tree commit diff stats
path: root/127next-word.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-15 22:21:15 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-15 22:52:41 -0700
commitae470b42f102d5da4f7d4255a47e3cf582079f33 (patch)
treeaa251ea7734370b9c152a5cf08a7b97c9c1de0c1 /127next-word.subx
parent8815cf7d57e738731dfc43680b4eccbaef9d822c (diff)
downloadmu-ae470b42f102d5da4f7d4255a47e3cf582079f33.tar.gz
6781 - new app: RPN (postfix) calculator
This was surprisingly hard; bugs discovered all over the place.
Diffstat (limited to '127next-word.subx')
-rw-r--r--127next-word.subx7
1 files changed, 3 insertions, 4 deletions
diff --git a/127next-word.subx b/127next-word.subx
index c3e9762d..6a186656 100644
--- a/127next-word.subx
+++ b/127next-word.subx
@@ -20,14 +20,13 @@ next-word:  # line: (addr stream byte), out: (addr slice)
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           6/r32/esi   8/disp8         .                 # copy *(ebp+8) to esi
     # edi = out
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           7/r32/edi   0xc/disp8       .                 # copy *(ebp+12) to edi
-    # skip-chars-matching(line, ' ')
+    # skip-chars-matching-whitespace(line)
     # . . push args
-    68/push  0x20/imm32/space
     ff          6/subop/push        1/mod/*+disp8   5/rm32/ebp    .           .             .           .           8/disp8         .                 # push *(ebp+8)
     # . . call
-    e8/call  skip-chars-matching/disp32
+    e8/call  skip-chars-matching-whitespace/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
+    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               4/imm32           # add to esp
 $next-word:check0:
     # if (line->read >= line->write) clear out and return
     # . eax = line->read