diff options
Diffstat (limited to 'subx/053new_segment.subx')
-rw-r--r-- | subx/053new_segment.subx | 8 |
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 |