diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-04-13 22:30:25 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-04-13 22:43:17 -0700 |
commit | 0b91d25cf591888252d5e99e7986e2544de31695 (patch) | |
tree | 173b2364d9c3027a05f7f3732c650094a26ba114 /subx/071read-line.subx | |
parent | d2f360d85eb9129983fc77a7d756ddd0676dd9dc (diff) | |
download | mu-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/071read-line.subx')
-rw-r--r-- | subx/071read-line.subx | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/subx/071read-line.subx b/subx/071read-line.subx index 6c53ba33..39c5f576 100644 --- a/subx/071read-line.subx +++ b/subx/071read-line.subx @@ -103,15 +103,7 @@ $read-line:end: $read-line:abort: # . _write(2/stderr, error) # . . push args - 68/push "read-line: line too long"/imm32 - 68/push 2/imm32/stderr - # . . call - e8/call _write/disp32 - # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP - # . _write(2/stderr, Newline) - # . . push args - 68/push Newline/imm32 + 68/push "read-line: line too long\n"/imm32 68/push 2/imm32/stderr # . . call e8/call _write/disp32 @@ -150,25 +142,8 @@ test-read-line: # . . discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP # write(_test-stream, "ab\ncd") - # . write(_test-stream, "ab") - # . . push args - 68/push "ab"/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, "\n") - # . . push args - 68/push Newline/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, "cd") # . . push args - 68/push "cd"/imm32 + 68/push "ab\ncd"/imm32 68/push _test-stream/imm32 # . . call e8/call write/disp32 |