about summary refs log tree commit diff stats
path: root/subx/013direct_addressing.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-12 23:15:34 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-12 23:15:34 -0700
commit544fbdc6e2b6022297afe6e260e1986f1ce9a003 (patch)
tree35b80c5c9c1714115ad4f028e033e4d635da898a /subx/013direct_addressing.cc
parent88b478087e65a3684b5e5d94992421919469040a (diff)
downloadmu-544fbdc6e2b6022297afe6e260e1986f1ce9a003.tar.gz
4686
Diffstat (limited to 'subx/013direct_addressing.cc')
-rw-r--r--subx/013direct_addressing.cc10
1 files changed, 5 insertions, 5 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;
 }