From 125bea475fab2220e3e462986cfc8313fa937f7f Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 15 Oct 2017 00:06:37 -0700 Subject: 4067 subx: 'mov' --- html/subx/012indirect_addressing.cc.html | 35 +++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'html/subx/012indirect_addressing.cc.html') diff --git a/html/subx/012indirect_addressing.cc.html b/html/subx/012indirect_addressing.cc.html index ab3650f6..b43a2098 100644 --- a/html/subx/012indirect_addressing.cc.html +++ b/html/subx/012indirect_addressing.cc.html @@ -257,7 +257,7 @@ if ('onhashchange' in window) { 193 +run: effective address is mem at address 0x60 (reg 3) 194 +run: storing 0xf0f0ff00 195 -196 //:: compare +196 //:: compare (cmp) 197 198 :(scenario compare_mem_at_r32_with_r32_greater) 199 % Reg[0].i = 0x60; @@ -336,6 +336,39 @@ if ('onhashchange' in window) { 272 +run: compare effective address with reg 3 273 +run: effective address is mem at address 0x60 (reg 0) 274 +run: SF=0; ZF=1; OF=0 +275 +276 //:: copy (mov) +277 +278 :(scenario copy_r32_to_mem_at_r32) +279 % Reg[3].i = 0xaf; +280 % Reg[0].i = 0x60; +281 # op ModRM SIB displacement immediate +282 89 18 # copy EBX (reg 3) to *EAX (reg 0) +283 +run: copy reg 3 to effective address +284 +run: effective address is mem at address 0x60 (reg 0) +285 +run: storing 0x000000af +286 +287 //: +288 +289 :(scenario copy_mem_at_r32_to_r32) +290 % Reg[0].i = 0x60; +291 % SET_WORD_IN_MEM(0x60, 0x000000af); +292 # op ModRM SIB displacement immediate +293 8b 18 # copy *EAX (reg 0) to EBX (reg 3) +294 +run: copy effective address to reg 3 +295 +run: effective address is mem at address 0x60 (reg 0) +296 +run: storing 0x000000af +297 +298 :(before "End Single-Byte Opcodes") +299 case 0x8b: { // copy r32 to r/m32 +300 uint8_t modrm = next(); +301 uint8_t reg1 = (modrm>>3)&0x7; +302 trace(2, "run") << "copy effective address to reg " << NUM(reg1) << end(); +303 int32_t* arg2 = effective_address(modrm); +304 Reg[reg1].i = *arg2; +305 trace(2, "run") << "storing 0x" << HEXWORD << *arg2 << end(); +306 break; +307 } -- cgit 1.4.1-2-gfad0