diff options
Diffstat (limited to 'subx/apps/crenshaw2-1.subx')
-rw-r--r-- | subx/apps/crenshaw2-1.subx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subx/apps/crenshaw2-1.subx b/subx/apps/crenshaw2-1.subx index d5bd2a01..7b4a8deb 100644 --- a/subx/apps/crenshaw2-1.subx +++ b/subx/apps/crenshaw2-1.subx @@ -26,7 +26,7 @@ e8/call abort/disp32 # discard arg 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # exit(0) + # syscall(exit, 0) bb/copy-to-EBX 0/imm32 b8/copy-to-EAX 1/imm32/exit cd/syscall 0x80/imm8 @@ -43,7 +43,7 @@ abort: # s : (address array byte) -> <void> e8/call error/disp32 # discard arg 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 4/imm32 # add to ESP - # exit(1) + # syscall(exit, 1) bb/copy-to-EBX 1/imm32 b8/copy-to-EAX 1/imm32/exit cd/syscall 0x80/imm8 @@ -90,7 +90,7 @@ write-stdout: # s : (address array byte) -> <void> 51/push-ECX 52/push-EDX 53/push-EBX - # write(1/stdout, (data) s+4, (size) *s) + # syscall(write, 1/stdout, (data) s+4, (size) *s) # fd = 1 (stdout) bb/copy-to-EBX 1/imm32 # x = s+4 @@ -99,7 +99,7 @@ write-stdout: # s : (address array byte) -> <void> # size = *s 8b/copy 1/mod/*+disp8 4/rm32/sib 5/base/EBP 4/index/none . 2/r32/EDX 8/disp8 . # copy *(EBP+8) to EDX 8b/copy 0/mod/indirect 2/rm32/EDX . . . 2/r32/EDX . . # copy *EDX to EDX - # call write() + # syscall b8/copy-to-EAX 4/imm32/write cd/syscall 0x80/imm8 # restore registers |