4710
Start using write() instead of _write().. and we promptly find a typo when dealing with real file descriptors.
This commit is contained in:
parent
104e521c04
commit
4cc517e0de
|
@ -54,8 +54,8 @@ write: # f : fd or (address stream), s : (address array byte) -> <void>
|
||||||
81 7/subop/compare 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 8/disp8 0x08000000/imm32 # compare *(EBP+8)
|
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:else/disp8
|
||||||
# push args
|
# push args
|
||||||
ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . . 8/disp8 . # push *(EBP+8)
|
|
||||||
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 . . 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)
|
||||||
# call
|
# call
|
||||||
e8/call _write/disp32
|
e8/call _write/disp32
|
||||||
# discard args
|
# discard args
|
||||||
|
|
Binary file not shown.
|
@ -50,36 +50,36 @@ abort: # s : (address array byte) -> <void>
|
||||||
|
|
||||||
# print out "Error: #{s} expected\n" to stderr
|
# print out "Error: #{s} expected\n" to stderr
|
||||||
error: # s : (address array byte) -> <void>
|
error: # s : (address array byte) -> <void>
|
||||||
# _write(2/stderr, "Error: ")
|
# write(2/stderr, "Error: ")
|
||||||
# push args
|
# push args
|
||||||
68/push "Error: "/imm32
|
68/push "Error: "/imm32
|
||||||
68/push 2/imm32/stderr
|
68/push 2/imm32/stderr
|
||||||
# call
|
# call
|
||||||
e8/call _write/disp32
|
e8/call write/disp32
|
||||||
# discard arg
|
# discard arg
|
||||||
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
||||||
# _write(2/stderr, s)
|
# write(2/stderr, s)
|
||||||
# push args
|
# push args
|
||||||
ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 4/base/ESP 4/index/none . . 4/disp8 . # push *(ESP+4)
|
ff 6/subop/push 1/mod/*+disp8 4/rm32/sib 4/base/ESP 4/index/none . . 4/disp8 . # push *(ESP+4)
|
||||||
68/push 2/imm32/stderr
|
68/push 2/imm32/stderr
|
||||||
# call
|
# call
|
||||||
e8/call _write/disp32
|
e8/call write/disp32
|
||||||
# discard arg
|
# discard arg
|
||||||
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
||||||
# _write(2/stderr, " expected")
|
# write(2/stderr, " expected")
|
||||||
# push args
|
# push args
|
||||||
68/push " expected"/imm32
|
68/push " expected"/imm32
|
||||||
68/push 2/imm32/stderr
|
68/push 2/imm32/stderr
|
||||||
# call
|
# call
|
||||||
e8/call _write/disp32
|
e8/call write/disp32
|
||||||
# discard arg
|
# discard arg
|
||||||
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
||||||
# _write(2/stderr, "\n")
|
# write(2/stderr, "\n")
|
||||||
# push args
|
# push args
|
||||||
68/push Newline/imm32
|
68/push Newline/imm32
|
||||||
68/push 2/imm32/stderr
|
68/push 2/imm32/stderr
|
||||||
# call
|
# call
|
||||||
e8/call _write/disp32
|
e8/call write/disp32
|
||||||
# discard arg
|
# discard arg
|
||||||
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
|
||||||
# end
|
# end
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue