diff options
Diffstat (limited to 'subx/056write.subx')
-rw-r--r-- | subx/056write.subx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subx/056write.subx b/subx/056write.subx index c9303b56..fbe65c3c 100644 --- a/subx/056write.subx +++ b/subx/056write.subx @@ -45,7 +45,7 @@ write: # f : fd or (address stream), s : (address array byte) -> <void> 89/copy 3/mod/direct 5/rm32/EBP . . . 4/r32/ESP . . # copy ESP to EBP # if (f < 0x08000000) _write(f, s), return # f can't be a user-mode address, so treat it as a kernel file descriptor 81 7/subop/compare 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 8/disp8 0x08000000/imm32 # compare *(EBP+8) - 7f/jump-if-greater $write:else/disp8 + 7f/jump-if-greater $write:fake/disp8 # push args ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 0xc/disp8 . # push *(EBP+12) ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 8/disp8 . # push *(EBP+8) @@ -54,7 +54,7 @@ write: # f : fd or (address stream), s : (address array byte) -> <void> # discard args 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP eb/jump $write:end/disp8 -$write:else: +$write:fake: # otherwise, treat 'f' as a stream to append to # save registers 50/push-EAX |