From 0b91d25cf591888252d5e99e7986e2544de31695 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 13 Apr 2019 22:30:25 -0700 Subject: 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. --- subx/apps/crenshaw2-1b.subx | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) (limited to 'subx/apps/crenshaw2-1b.subx') 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 -- cgit 1.4.1-2-gfad0