diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-28 14:31:58 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-28 14:31:58 -0700 |
commit | 5cea4ef897c0aac2b35315c4208140e0ed66bd34 (patch) | |
tree | 2a2ea5aa3907b99b344006120266730d86c4f0d4 /subx/ex6.subx | |
parent | b3a3d14f98305af875c9363b9e894965cd4b45f7 (diff) | |
download | mu-5cea4ef897c0aac2b35315c4208140e0ed66bd34.tar.gz |
4449
Diffstat (limited to 'subx/ex6.subx')
-rw-r--r-- | subx/ex6.subx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/subx/ex6.subx b/subx/ex6.subx index 685076e7..2c9555d8 100644 --- a/subx/ex6.subx +++ b/subx/ex6.subx @@ -13,14 +13,13 @@ ## write(stdout, x, 1) # fd = 1 (stdout) bb/copy 1/imm32 # copy 1 to EBX - # set location to write out + # initialize x (location to write result to) b9/copy 0x08049097/imm32 # copy to ECX - # set size + # initialize size ba/copy 0x08049093/imm32 # copy to EDX 8b/copy 0/mod/indirect 2/rm32/edx 2/r32/edx # copy *EDX to EDX - # syscall = write + # write(fd, x, size) b8/copy 4/imm32 # copy 4 to EAX - # call cd/syscall 0x80/imm8 # int 80h ## exit(EBX) |