about summary refs log tree commit diff stats
path: root/linux/104new-segment.subx
diff options
context:
space:
mode:
Diffstat (limited to 'linux/104new-segment.subx')
-rw-r--r--linux/104new-segment.subx40
1 files changed, 20 insertions, 20 deletions
diff --git a/linux/104new-segment.subx b/linux/104new-segment.subx
index 723e1afb..5a79ff19 100644
--- a/linux/104new-segment.subx
+++ b/linux/104new-segment.subx
@@ -16,26 +16,26 @@
 # . 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
 
-Entry:   # manual test
-    # var ad/ecx: allocation-descriptor
-    68/push  0/imm32/limit
-    68/push  0/imm32/curr
-    89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
-    # new-segment(0x1000, ad)
-    # . . push args
-    51/push-ecx
-    68/push  0x1000/imm32
-    # . . call
-    e8/call  new-segment/disp32
-    # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
-    # var eax: (addr _) = ad->curr
-    8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           0/r32/eax   .               .                 # copy *ecx to eax
-    # write to *eax to check that we have access to the newly-allocated segment
-    c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0x34/imm32        # copy to *eax
-    # syscall_exit(eax)
-    89/copy                         3/mod/direct    3/rm32/ebx    .           .             .           0/r32/eax   .               .                 # copy eax to ebx
-    e8/call  syscall_exit/disp32
+#? Entry:   # manual test
+#?     # var ad/ecx: allocation-descriptor
+#?     68/push  0/imm32/limit
+#?     68/push  0/imm32/curr
+#?     89/copy                         3/mod/direct    1/rm32/ecx    .           .             .           4/r32/esp   .               .                 # copy esp to ecx
+#?     # new-segment(0x1000, ad)
+#?     # . . push args
+#?     51/push-ecx
+#?     68/push  0x1000/imm32
+#?     # . . call
+#?     e8/call  new-segment/disp32
+#?     # . . discard args
+#?     81          0/subop/add         3/mod/direct    4/rm32/esp    .           .             .           .           .               8/imm32           # add to esp
+#?     # var eax: (addr _) = ad->curr
+#?     8b/copy                         0/mod/indirect  1/rm32/ecx    .           .             .           0/r32/eax   .               .                 # copy *ecx to eax
+#?     # write to *eax to check that we have access to the newly-allocated segment
+#?     c7          0/subop/copy        0/mod/direct    0/rm32/eax    .           .             .           .           .               0x34/imm32        # copy to *eax
+#?     # syscall_exit(eax)
+#?     89/copy                         3/mod/direct    3/rm32/ebx    .           .             .           0/r32/eax   .               .                 # copy eax to ebx
+#?     e8/call  syscall_exit/disp32
 
 new-segment:  # len: int, ad: (addr allocation-descriptor)
     # . prologue