about summary refs log tree commit diff stats
path: root/subx/053new_segment.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-12-03 12:03:23 -0800
committerKartik Agaram <vc@akkartik.com>2018-12-03 12:03:23 -0800
commit91dab3e1a499cac50abd146ce849d3dab94229ab (patch)
tree0ae698ea9ed9e1e3523aa6e5aefa9e0b8c8e2400 /subx/053new_segment.subx
parent26efb5f5c2a3ddbaf82f06e6ca6090caf7ab5a16 (diff)
downloadmu-91dab3e1a499cac50abd146ce849d3dab94229ab.tar.gz
4824
Diffstat (limited to 'subx/053new_segment.subx')
-rw-r--r--subx/053new_segment.subx14
1 files changed, 7 insertions, 7 deletions
diff --git a/subx/053new_segment.subx b/subx/053new_segment.subx
index efbfc1a3..27fd8ea1 100644
--- a/subx/053new_segment.subx
+++ b/subx/053new_segment.subx
@@ -12,33 +12,33 @@
     # . . call
     e8/call  new-segment/disp32
     # . . discard args
-    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32                 # add to ESP
+    81          0/subop/add         3/mod/direct    4/rm32/ESP    .           .             .           .           .               4/imm32           # add to ESP
 
     # write to *EAX to check that we have access to the newly-allocated segment
-    c7/copy                         0/mod/direct    0/rm32/EAX    .           .             .           .           .               0x34/imm32              # copy to *EAX
+    c7/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
+    89/copy                         3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                 # copy EAX to EBX
     b8/copy-to-EAX  1/imm32/exit
     cd/syscall  0x80/imm8
 
 new-segment:  # len : int -> address
     # . prolog
     55/push-EBP
-    89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                       # copy ESP to EBP
+    89/copy                         3/mod/direct    5/rm32/EBP    .           .             .           4/r32/ESP   .               .                 # copy ESP to EBP
     53/push-EBX
     # copy len to _mmap-new-segment->len
     # TODO: compute _mmap-new-segment+4 before runtime
-    8b/copy                         1/mod/*+disp8   4/rm32/sib    5/base/EBP  4/index/none  .           0/r32/EAX   8/disp8         .                       # copy *(EBP+8) to EAX
+    8b/copy                         1/mod/*+disp8   4/rm32/sib    5/base/EBP  4/index/none  .           0/r32/EAX   8/disp8         .                 # copy *(EBP+8) to EAX
     bb/copy-to-EBX  _mmap-new-segment/imm32
-    89/copy                         1/mod/*+disp8   3/rm32/EBX    .           .             .           0/r32/EAX   4/disp8         .                       # copy EAX to *(EBX+4)
+    89/copy                         1/mod/*+disp8   3/rm32/EBX    .           .             .           0/r32/EAX   4/disp8         .                 # copy EAX to *(EBX+4)
     # mmap(_mmap-new-segment)
     bb/copy-to-EBX  _mmap-new-segment/imm32
     b8/copy-to-EAX  0x5a/imm32/mmap
     cd/syscall  0x80/imm8
     # . epilog
     5b/pop-to-EBX
-    89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                       # copy EBP to ESP
+    89/copy                         3/mod/direct    4/rm32/ESP    .           .             .           5/r32/EBP   .               .                 # copy EBP to ESP
     5d/pop-to-EBP
     c3/return