diff options
Diffstat (limited to 'subx/examples/ex11.subx')
-rw-r--r-- | subx/examples/ex11.subx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subx/examples/ex11.subx b/subx/examples/ex11.subx index 038bd4c6..cd8cdf4d 100644 --- a/subx/examples/ex11.subx +++ b/subx/examples/ex11.subx @@ -22,7 +22,7 @@ # main: e8/call run-tests/disp32 # 'run-tests' is a function created automatically by SubX. It calls all functions that start with 'test-'. - # exit(EAX) + # syscall(exit, EAX) 89/copy 3/mod/direct 3/rm32/EBX . . . 0/r32/EAX . . # copy EAX to EBX b8/copy-to-EAX 1/imm32 cd/syscall 0x80/imm8 @@ -312,7 +312,7 @@ write-stderr: # s : (address array byte) -> <void> 51/push-ECX 52/push-EDX 53/push-EBX - # write(2/stderr, (data) s+4, (size) *s) + # syscall(write, 2/stderr, (data) s+4, (size) *s) # fd = 2 (stderr) bb/copy-to-EBX 2/imm32 # x = s+4 @@ -321,7 +321,7 @@ write-stderr: # 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 |