about summary refs log tree commit diff stats
path: root/subx/apps/hex.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-04-13 22:30:25 -0700
committerKartik Agaram <vc@akkartik.com>2019-04-13 22:43:17 -0700
commit0b91d25cf591888252d5e99e7986e2544de31695 (patch)
tree173b2364d9c3027a05f7f3732c650094a26ba114 /subx/apps/hex.subx
parentd2f360d85eb9129983fc77a7d756ddd0676dd9dc (diff)
downloadmu-0b91d25cf591888252d5e99e7986e2544de31695.tar.gz
5090
Start using the new newline escape in string literals everywhere.

I could use it more aggressively, but it makes tests harder to read. So
only one line of text per string for now.
Diffstat (limited to 'subx/apps/hex.subx')
-rw-r--r--subx/apps/hex.subx40
1 files changed, 4 insertions, 36 deletions
diff --git a/subx/apps/hex.subx b/subx/apps/hex.subx
index 536bb65d..c0627c77 100644
--- a/subx/apps/hex.subx
+++ b/subx/apps/hex.subx
@@ -810,15 +810,7 @@ test-scan-next-byte-skips-comment:
     # initialize '_test-stream' to input with leading comment
     # . write(_test-stream, comment)
     # . . push args
-    68/push  "#x"/imm32
-    68/push  _test-stream/imm32
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(_test-stream, Newline)
-    # . . push args
-    68/push  Newline/imm32
+    68/push  "#x\n"/imm32
     68/push  _test-stream/imm32
     # . . call
     e8/call  write/disp32
@@ -928,15 +920,7 @@ test-scan-next-byte-skips-comment-and-whitespace:
     # initialize '_test-stream' to input with leading comment and more whitespace after newline
     # . write(_test-stream, comment)
     # . . push args
-    68/push  "#x"/imm32
-    68/push  _test-stream/imm32
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(_test-stream, Newline)
-    # . . push args
-    68/push  Newline/imm32
+    68/push  "#x\n"/imm32
     68/push  _test-stream/imm32
     # . . call
     e8/call  write/disp32
@@ -1046,15 +1030,7 @@ test-scan-next-byte-skips-whitespace-and-comment:
     # initialize '_test-stream' to input with leading whitespace and comment
     # . write(_test-stream, comment)
     # . . push args
-    68/push  " #x"/imm32
-    68/push  _test-stream/imm32
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(_test-stream, Newline)
-    # . . push args
-    68/push  Newline/imm32
+    68/push  " #x\n"/imm32
     68/push  _test-stream/imm32
     # . . call
     e8/call  write/disp32
@@ -1466,15 +1442,7 @@ test-skip-until-newline:
     # initialize '_test-stream' to "abc\nde"
     # . write(_test-stream, "abc")
     # . . push args
-    68/push  "abc"/imm32
-    68/push  _test-stream/imm32
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(_test-stream, Newline)
-    # . . push args
-    68/push  Newline/imm32
+    68/push  "abc\n"/imm32
     68/push  _test-stream/imm32
     # . . call
     e8/call  write/disp32