diff options
Diffstat (limited to 'subx/examples/ex4.subx')
-rw-r--r-- | subx/examples/ex4.subx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/subx/examples/ex4.subx b/subx/examples/ex4.subx index 2f5b0e73..89b3bdc9 100644 --- a/subx/examples/ex4.subx +++ b/subx/examples/ex4.subx @@ -13,7 +13,7 @@ # fd = 0 (stdin) bb/copy 0/imm32 # copy 0 to EBX # initialize x (location to write result to) - b9/copy 0x080490a7/imm32 # copy to ECX + b9/copy x/imm32 # copy to ECX # size = 1 character ba/copy 1/imm32 # copy 1 to EDX # read(fd, x, size) @@ -24,7 +24,7 @@ # fd = 1 (stdout) bb/copy 1/imm32 # copy 1 to EBX # initialize x (location to read from) - b9/copy 0x080490a7/imm32 # copy to ECX + b9/copy x/imm32 # copy to ECX # size = 1 character ba/copy 1/imm32 # copy 1 to EDX # write(fd, x, size) @@ -35,7 +35,8 @@ b8/copy 1/imm32 # copy 1 to EAX cd/syscall 0x80/imm8 # int 80h -== 0x080490a7 # data segment +== data +x: 00 00 00 00 # space for read() to write to # vim:ft=subx:nowrap |