about summary refs log tree commit diff stats
path: root/subx/apps/crenshaw2-1b.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/crenshaw2-1b.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/crenshaw2-1b.subx')
-rw-r--r--subx/apps/crenshaw2-1b.subx36
1 files changed, 6 insertions, 30 deletions
diff --git a/subx/apps/crenshaw2-1b.subx b/subx/apps/crenshaw2-1b.subx
index 969d12f0..2c396fb3 100644
--- a/subx/apps/crenshaw2-1b.subx
+++ b/subx/apps/crenshaw2-1b.subx
@@ -154,33 +154,17 @@ compile:  # in : (address buffered-file), out : fd or (address stream), err : fd
     e8/call  write/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(out, "b8/copy-to-EAX  1/imm32/exit")
+    # . write(out, "b8/copy-to-EAX  1/imm32/exit\n")
     # . . push args
-    68/push  "b8/copy-to-EAX  1/imm32/exit"/imm32
+    68/push  "b8/copy-to-EAX  1/imm32/exit\n"/imm32
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0xc/disp8       .                 # push *(EBP+12)
     # . . call
     e8/call  write/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(out, Newline)
-    # . . push args
-    68/push  Newline/imm32
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0xc/disp8       .                 # push *(EBP+12)
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(out, "cd/syscall  0x80/imm8")
+    # . write(out, "cd/syscall  0x80/imm8\n")
     # . . push args
-    68/push  "cd/syscall  0x80/imm8"/imm32
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0xc/disp8       .                 # push *(EBP+12)
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # . write(out, Newline)
-    # . . push args
-    68/push  Newline/imm32
+    68/push  "cd/syscall  0x80/imm8\n"/imm32
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0xc/disp8       .                 # push *(EBP+12)
     # . . call
     e8/call  write/disp32
@@ -699,17 +683,9 @@ expected:  # ed : (address exit-descriptor), f : fd or (address stream), s : (ad
     e8/call  write/disp32
     # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # write(f, " expected")
+    # write(f, " expected\n")
     # . . push args
-    68/push  " expected"/imm32
-    ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0xc/disp8       .                 # push *(EBP+12)
-    # . . call
-    e8/call  write/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               8/imm32           # add to ESP
-    # write(f, Newline)
-    # . . push args
-    68/push  Newline/imm32
+    68/push  " expected\n"/imm32
     ff          6/subop/push        1/mod/*+disp8   5/rm32/EBP    .           .             .           .           0xc/disp8       .                 # push *(EBP+12)
     # . . call
     e8/call  write/disp32