about summary refs log tree commit diff stats
path: root/subx/053new_segment.subx
diff options
context:
space:
mode:
Diffstat (limited to 'subx/053new_segment.subx')
-rw-r--r--subx/053new_segment.subx18
1 files changed, 9 insertions, 9 deletions
diff --git a/subx/053new_segment.subx b/subx/053new_segment.subx
index 69115575..3809eee5 100644
--- a/subx/053new_segment.subx
+++ b/subx/053new_segment.subx
@@ -1,17 +1,17 @@
 # Create a new segment (for data) using mmap().
 
 == code
-#   instruction                     effective address                                                   operand     displacement    immediate
-#   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
+#   instruction                     effective address                                                   register    displacement    immediate
+# . 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
 
 # main:  (manual test if this is the last file loaded)
     # EAX = new-segment(0x1000)
-    # push args
+    # . . push args
     68/push  0x1000/imm32
-    # call
+    # . . call
     e8/call  new-segment/disp32
-    # discard args
+    # . . discard args
     81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32                 # add to ESP
 
     # store to *EAX
@@ -23,7 +23,7 @@
     cd/syscall  0x80/imm8
 
 new-segment:  # len : int -> address
-    # prolog
+    # . prolog
     55/push-EBP
     89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                       # copy ESP to EBP
     53/push-EBX
@@ -36,7 +36,7 @@ new-segment:  # len : int -> address
     bb/copy-to-EBX  mmap-new-segment/imm32
     b8/copy-to-EAX  0x5a/imm32/mmap
     cd/syscall  0x80/imm8
-    # epilog
+    # . epilog
     5b/pop-to-EBX
     89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                       # copy EBP to ESP
     5d/pop-to-EBP
@@ -59,4 +59,4 @@ mmap-new-segment:  # type mmap_arg_struct
     # offset
     00 00 00 00  # 0 since MAP_ANONYMOUS is specified
 
-# vim:nowrap:textwidth=0
+# . . vim:nowrap:textwidth=0