diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-06-10 23:09:30 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-06-10 23:09:30 -0700 |
commit | 7dac9ade153d736b7a183d073d83b7a17b22b4cc (patch) | |
tree | f19ba4be87306ae53caa0ba8c61e5202899cee48 /062write-stream.subx | |
parent | 72d893b6b1c0dcaea5c4a38dd6fd83fd0569dd79 (diff) | |
download | mu-7dac9ade153d736b7a183d073d83b7a17b22b4cc.tar.gz |
6507 - use syscall names everywhere
Diffstat (limited to '062write-stream.subx')
-rw-r--r-- | 062write-stream.subx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/062write-stream.subx b/062write-stream.subx index 22fc64d1..d7e975c0 100644 --- a/062write-stream.subx +++ b/062write-stream.subx @@ -12,8 +12,7 @@ #? e8/call write-stream/disp32 #? # syscall(exit, Num-test-failures) #? 8b/copy 0/mod/indirect 5/rm32/.disp32 . . 3/r32/ebx Num-test-failures/disp32 # copy *Num-test-failures to ebx -#? b8/copy-to-eax 1/imm32/exit -#? cd/syscall 0x80/imm8 +#? e8/call syscall_exit/disp32 write-stream: # f: fd or (addr stream byte), s: (addr stream byte) # . prologue @@ -100,8 +99,7 @@ _write-stream: # fd: int, s: (addr stream byte) # . . size: edx = s->write - s->read 29/subtract 3/mod/direct 2/rm32/edx . . . 7/r32/edi . . # subtract edi from edx # . . syscall - b8/copy-to-eax 4/imm32/write - cd/syscall 0x80/imm8 + e8/call syscall_write/disp32 # if (eax < 0) abort 3d/compare-eax-with 0/imm32 0f 8c/jump-if-< $_write-stream:abort/disp32 @@ -130,8 +128,7 @@ $_write-stream:abort: 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp # . syscall(exit, 1) bb/copy-to-ebx 1/imm32 - b8/copy-to-eax 1/imm32/exit - cd/syscall 0x80/imm8 + e8/call syscall_exit/disp32 # never gets here test-write-stream-single: |