about summary refs log tree commit diff stats
path: root/subx/018functions.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-20 18:26:10 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-20 18:26:10 -0700
commitaa2e2155beb965b3396c01861085ecfec8841ecc (patch)
treee3da09c7a0e919fd98629d8e791096aca47f6368 /subx/018functions.cc
parent21fe59329478a2d4db4f1d4f19b88f9978bffa6e (diff)
downloadmu-aa2e2155beb965b3396c01861085ecfec8841ecc.tar.gz
4380 - single-byte opcodes all documented
Diffstat (limited to 'subx/018functions.cc')
-rw-r--r--subx/018functions.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/subx/018functions.cc b/subx/018functions.cc
index c4fb5d23..ac6df740 100644
--- a/subx/018functions.cc
+++ b/subx/018functions.cc
@@ -1,6 +1,9 @@
 //:: call
 
-:(scenario call_imm32)
+:(before "End Initialize Op Names(name)")
+put(name, 0xe8, "call disp32");
+
+:(scenario call_disp32)
 % Reg[ESP].u = 0x64;
 == 0x1
 # op  ModR/M  SIB   displacement  immediate
@@ -12,7 +15,7 @@
 +run: jumping to 0x000000a6
 
 :(before "End Single-Byte Opcodes")
-case 0xe8: {  // call imm32 relative to next EIP
+case 0xe8: {  // call disp32 relative to next EIP
   int32_t offset = imm32();
   trace(2, "run") << "call imm32 0x" << HEXWORD << offset << end();
   push(EIP);
@@ -63,6 +66,9 @@ a0 00 00 00  # 0xa0
 
 //:: ret
 
+:(before "End Initialize Op Names(name)")
+put(name, 0xc3, "return from most recent unfinished call");
+
 :(scenario ret)
 % Reg[ESP].u = 0x60;
 == 0x1  # code segment