about summary refs log tree commit diff stats
path: root/053new-segment.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-06-10 23:09:30 -0700
committerKartik Agaram <vc@akkartik.com>2020-06-10 23:09:30 -0700
commit7dac9ade153d736b7a183d073d83b7a17b22b4cc (patch)
treef19ba4be87306ae53caa0ba8c61e5202899cee48 /053new-segment.subx
parent72d893b6b1c0dcaea5c4a38dd6fd83fd0569dd79 (diff)
downloadmu-7dac9ade153d736b7a183d073d83b7a17b22b4cc.tar.gz
6507 - use syscall names everywhere
Diffstat (limited to '053new-segment.subx')
-rw-r--r--053new-segment.subx6
1 files changed, 2 insertions, 4 deletions
diff --git a/053new-segment.subx b/053new-segment.subx
index a400eeed..4c249abe 100644
--- a/053new-segment.subx
+++ b/053new-segment.subx
@@ -35,8 +35,7 @@ Entry:   # manual test
     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
-    b8/copy-to-eax  1/imm32/exit
-    cd/syscall  0x80/imm8
+    e8/call  syscall_exit/disp32
 
 new-segment:  # len: int, ad: (addr allocation-descriptor)
     # . prologue
@@ -50,8 +49,7 @@ new-segment:  # len: int, ad: (addr allocation-descriptor)
     89/copy                         0/mod/indirect  5/rm32/.disp32            .             .           0/r32/eax   $_mmap-new-segment:len/disp32     # copy eax to *$_mmap-new-segment:len
     # mmap(_mmap-new-segment)
     bb/copy-to-ebx  _mmap-new-segment/imm32
-    b8/copy-to-eax  0x5a/imm32/mmap
-    cd/syscall  0x80/imm8
+    e8/call  syscall_mmap/disp32
     # copy {eax, eax+len} to *ad
     # . ebx = ad
     8b/copy                         1/mod/*+disp8   5/rm32/ebp    .           .             .           3/r32/ebx   0xc/disp8       .                 # copy *(ebp+12) to ebx