about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/013direct_addressing.cc10
-rw-r--r--subx/014indirect_addressing.cc10
2 files changed, 10 insertions, 10 deletions
diff --git a/subx/013direct_addressing.cc b/subx/013direct_addressing.cc
index 5177252f..c97fd833 100644
--- a/subx/013direct_addressing.cc
+++ b/subx/013direct_addressing.cc
@@ -343,11 +343,11 @@ put(name, "89", "copy r32 to rm32");
 :(before "End Single-Byte Opcodes")
 case 0x89: {  // copy r32 to r/m32
   uint8_t modrm = next();
-  uint8_t reg2 = (modrm>>3)&0x7;
-  trace(90, "run") << "copy " << rname(reg2) << " to r/m32" << end();
-  int32_t* arg1 = effective_address(modrm);
-  *arg1 = Reg[reg2].i;
-  trace(90, "run") << "storing 0x" << HEXWORD << *arg1 << end();
+  uint8_t rsrc = (modrm>>3)&0x7;
+  trace(90, "run") << "copy " << rname(rsrc) << " to r/m32" << end();
+  int32_t* dest = effective_address(modrm);
+  *dest = Reg[rsrc].i;
+  trace(90, "run") << "storing 0x" << HEXWORD << *dest << end();
   break;
 }
 
diff --git a/subx/014indirect_addressing.cc b/subx/014indirect_addressing.cc
index 8554b6ef..a0369590 100644
--- a/subx/014indirect_addressing.cc
+++ b/subx/014indirect_addressing.cc
@@ -404,12 +404,12 @@ f0 cc bb aa  # 0xf0 with more data in following bytes
 :(before "End Single-Byte Opcodes")
 case 0x88: {  // copy r8 to r/m8
   uint8_t modrm = next();
-  uint8_t reg2 = (modrm>>3)&0x7;
-  trace(90, "run") << "copy lowermost byte of " << rname(reg2) << " to r8/m8-at-r32" << end();
+  uint8_t rsrc = (modrm>>3)&0x7;
+  trace(90, "run") << "copy lowermost byte of " << rname(rsrc) << " to r8/m8-at-r32" << end();
   // use unsigned to zero-extend 8-bit value to 32 bits
-  uint8_t* arg1 = reinterpret_cast<uint8_t*>(effective_address(modrm));
-  *arg1 = Reg[reg2].u;
-  trace(90, "run") << "storing 0x" << HEXBYTE << NUM(*arg1) << end();
+  uint8_t* dest = reinterpret_cast<uint8_t*>(effective_address(modrm));
+  *dest = Reg[rsrc].u;
+  trace(90, "run") << "storing 0x" << HEXBYTE << NUM(*dest) << end();
   break;
 }