about summary refs log tree commit diff stats
path: root/subx
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
parent21fe59329478a2d4db4f1d4f19b88f9978bffa6e (diff)
downloadmu-aa2e2155beb965b3396c01861085ecfec8841ecc.tar.gz
4380 - single-byte opcodes all documented
Diffstat (limited to 'subx')
-rw-r--r--subx/012direct_addressing.cc2
-rw-r--r--subx/018functions.cc10
-rw-r--r--subx/019syscalls.cc3
3 files changed, 12 insertions, 3 deletions
diff --git a/subx/012direct_addressing.cc b/subx/012direct_addressing.cc
index 61eb3d9d..601f7ab2 100644
--- a/subx/012direct_addressing.cc
+++ b/subx/012direct_addressing.cc
@@ -276,7 +276,7 @@ case 0x89: {  // copy r32 to r/m32
 //:: xchg
 
 :(before "End Initialize Op Names(name)")
-put(name, 0x01, "swap the contents of r32 and rm32");
+put(name, 0x87, "swap the contents of r32 and rm32");
 
 :(scenario xchg_r32_with_r32)
 % Reg[EBX].i = 0xaf;
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
diff --git a/subx/019syscalls.cc b/subx/019syscalls.cc
index 16a1c3ce..b67a36f0 100644
--- a/subx/019syscalls.cc
+++ b/subx/019syscalls.cc
@@ -1,3 +1,6 @@
+:(before "End Initialize Op Names(name)")
+put(name, 0xcd, "software interrupt (0x80 only)");
+
 :(before "End Single-Byte Opcodes")
 case 0xcd: {  // int imm8 (software interrupt)
   trace(2, "run") << "syscall" << end();