about summary refs log tree commit diff stats
path: root/050_write.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-01-27 00:36:44 -0800
committerKartik Agaram <vc@akkartik.com>2020-01-27 00:36:44 -0800
commit71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990 (patch)
tree56307b5145be44b2239d3c782234309ed714f1b6 /050_write.subx
parent1a65c3af0f797892f5981f8ebd33c275c1ef06b0 (diff)
downloadmu-71eb22a5bf94f5fa0a3c95212450e3c6a1a6a990.tar.gz
5924
Diffstat (limited to '050_write.subx')
-rw-r--r--050_write.subx8
1 files changed, 4 insertions, 4 deletions
diff --git a/050_write.subx b/050_write.subx
index a7467b0d..24acf888 100644
--- a/050_write.subx
+++ b/050_write.subx
@@ -11,7 +11,7 @@ Entry:  # just exit; can't test _write just yet
     b8/copy-to-eax  1/imm32/exit
     cd/syscall  0x80/imm8
 
-_write:  # fd : int, s : (addr array byte)
+_write:  # fd: int, s: (addr array byte)
     # . prologue
     55/push-ebp
     89/copy                         3/mod/direct    5/rm32/ebp    .           .             .           4/r32/esp   .               .                 # copy esp to ebp
@@ -21,12 +21,12 @@ _write:  # fd : int, s : (addr array byte)
     52/push-edx
     53/push-ebx
     # syscall(write, fd, (data) s+4, (size) *s)
-    # . fd : ebx
+    # . ebx = fd
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           3/r32/ebx   8/disp8         .                 # copy *(ebp+8) to ebx
-    # . data : ecx = s+4
+    # . var data/ecx: (addr byte) = s+4
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           1/r32/ecx   0xc/disp8       .                 # copy *(ebp+12) to ecx
     81          0/subop/add         3/mod/direct    1/rm32/ecx    .           .             .           .           .               4/imm32           # add to ecx
-    # . size : edx = *s
+    # . var size/edx: int = *s
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           2/r32/edx   0xc/disp8       .                 # copy *(ebp+12) to edx
     8b/copy                         0/mod/indirect  2/rm32/edx    .           .             .           2/r32/edx   .               .                 # copy *edx to edx
     # . syscall