diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-01 11:09:07 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-01 11:09:07 -0700 |
commit | ca00f6b97c52262b39c28cccb76b52e059553f13 (patch) | |
tree | 3c6e1ea3e36c849a344eac03a468b3e853241bb3 /subx/019functions.cc | |
parent | 75e30d2faa3480ae8810856d6527089ba88346a5 (diff) | |
download | mu-ca00f6b97c52262b39c28cccb76b52e059553f13.tar.gz |
4634
Diffstat (limited to 'subx/019functions.cc')
-rw-r--r-- | subx/019functions.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/subx/019functions.cc b/subx/019functions.cc index fbc7e605..18887d27 100644 --- a/subx/019functions.cc +++ b/subx/019functions.cc @@ -52,15 +52,15 @@ case 2: { // call function pointer at r/m32 :(scenario call_mem_at_r32) % Reg[ESP].u = 0x64; -% Reg[EBX].u = 0x10; +% Reg[EBX].u = 0x2000; == 0x1 # code segment # op ModR/M SIB displacement immediate ff 13 # call function offset at *EBX # next EIP is 3 -== 0x10 # data segment +== 0x2000 # data segment a0 00 00 00 # 0xa0 +run: call to r/m32 -+run: effective address is 0x10 (EBX) ++run: effective address is 0x2000 (EBX) +run: decrementing ESP to 0x00000060 +run: pushing value 0x00000003 +run: jumping to 0x000000a3 @@ -71,11 +71,11 @@ a0 00 00 00 # 0xa0 put(name, "c3", "return from most recent unfinished call"); :(scenario ret) -% Reg[ESP].u = 0x60; +% Reg[ESP].u = 0x2000; == 0x1 # code segment # op ModR/M SIB displacement immediate c3 -== 0x60 # data segment +== 0x2000 # data segment 10 00 00 00 # 0x10 +run: return +run: popping value 0x00000010 |