about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/examples/ex6bin166 -> 165 bytes
-rw-r--r--subx/examples/ex6.subx5
2 files changed, 2 insertions, 3 deletions
diff --git a/subx/examples/ex6 b/subx/examples/ex6
index b897bc05..10e38936 100755
--- a/subx/examples/ex6
+++ b/subx/examples/ex6
Binary files differdiff --git a/subx/examples/ex6.subx b/subx/examples/ex6.subx
index 48dbb7a3..567c2e24 100644
--- a/subx/examples/ex6.subx
+++ b/subx/examples/ex6.subx
@@ -10,14 +10,13 @@
 # op          subop               mod             rm32          base        index         scale       r32
 # 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes
 
-  ## write(stdout, x, 1)
+  ## write(stdout, x, size)
   # fd = 1 (stdout)
   bb/copy                                                                                                                         1/imm32           # copy 1 to EBX
   # initialize x (location to write result to)
   b9/copy                                                                                                                         x/imm32           # copy to ECX
   # initialize size
-  ba/copy                                                                                                                         size/imm32        # copy to EDX
-  8b/copy                         0/mod/indirect  2/rm32/EDX                                          2/r32/EDX                                     # copy *EDX to EDX
+  8b/copy                         0/mod/indirect  5/rm32/.disp32                                      2/r32/EDX   size/disp32                       # copy *size to EDX
   # write(fd, x, size)
   b8/copy                                                                                                                         4/imm32           # copy 4 to EAX
   cd/syscall                                                                                                                      0x80/imm8         # int 80h