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-10-05 21:30:22 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-05 21:30:22 -0700
commit94ad882e828f83df4a4cc0deab1a10e9d5e54eec (patch)
treef51448732674fa8744e8517c4755255afc764b1f /subx/053new_segment.subx
parent03d50cc83c7c2bebb2b019667b80c1c51f4a8def (diff)
downloadmu-94ad882e828f83df4a4cc0deab1a10e9d5e54eec.tar.gz
4668
Diffstat (limited to 'subx/053new_segment.subx')
-rw-r--r--subx/053new_segment.subx8
1 files changed, 4 insertions, 4 deletions
diff --git a/subx/053new_segment.subx b/subx/053new_segment.subx
index fc0dfffc..f8524964 100644
--- a/subx/053new_segment.subx
+++ b/subx/053new_segment.subx
@@ -20,7 +20,7 @@
 
   # exit(EAX)
   89/copy                         3/mod/direct    3/rm32/EBX    .           .             .           0/r32/EAX   .               .                       # copy EAX to EBX
-  b8/copy                         .               .             .           .             .           .           .               1/imm32/exit            # copy to EAX
+  b8/copy-to-EAX  1/imm32/exit
   cd/syscall  0x80/imm8
 
 new-segment:  # len : int -> address
@@ -31,11 +31,11 @@ new-segment:  # len : int -> address
   # 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
-  bb/copy                         .               .             .           .             .           .           .               mmap-new-segment/imm32  # copy to EBX
+  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)
   # mmap(mmap-new-segment)
-  bb/copy                         .               .             .           .             .           .           .               mmap-new-segment/imm32  # copy to EBX
-  b8/copy                         .               .             .           .             .           .           .               0x5a/imm32/mmap         # copy to EAX
+  bb/copy-to-EBX  mmap-new-segment/imm32
+  b8/copy-to-EAX  0x5a/imm32/mmap
   cd/syscall  0x80/imm8
   # epilog
   5b/pop-to-EBX