about summary refs log tree commit diff stats
path: root/subx/017functions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'subx/017functions.cc')
-rw-r--r--subx/017functions.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/subx/017functions.cc b/subx/017functions.cc
index 13ac41d9..163894f2 100644
--- a/subx/017functions.cc
+++ b/subx/017functions.cc
@@ -47,10 +47,12 @@ case 2: {  // call function pointer at r/m32
 :(scenario call_mem_at_r32)
 % Reg[ESP].u = 0x64;
 % Reg[EBX].u = 0x10;
-% write_mem_i32(0x10, 0x000000a0);
+== 0x1  # code segment
 # op  ModR/M  SIB   displacement  immediate
   ff  13                                       # call function offset at *EBX
   # next EIP is 3
+== 0x10  # data segment
+a0 00 00 00  # 0xa0
 +run: call to r/m32
 +run: effective address is 0x10 (EBX)
 +run: decrementing ESP to 0x00000060
@@ -61,9 +63,11 @@ case 2: {  // call function pointer at r/m32
 
 :(scenario ret)
 % Reg[ESP].u = 0x60;
-% write_mem_i32(0x60, 0x00000010);
+== 0x1  # code segment
 # op  ModR/M  SIB   displacement  immediate
   c3
+== 0x60  # data segment
+10 00 00 00  # 0x10
 +run: return
 +run: popping value 0x00000010
 +run: jumping to 0x00000010