From 3dedbe9ce368d82b1310beca2695728fd8ed70c8 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 16 Oct 2017 02:58:42 -0700 Subject: 4072 --- html/subx/013immediate_addressing.cc.html | 71 ++++++------------------------- 1 file changed, 12 insertions(+), 59 deletions(-) (limited to 'html/subx/013immediate_addressing.cc.html') diff --git a/html/subx/013immediate_addressing.cc.html b/html/subx/013immediate_addressing.cc.html index 8b5be4ba..bb9e6ea8 100644 --- a/html/subx/013immediate_addressing.cc.html +++ b/html/subx/013immediate_addressing.cc.html @@ -15,20 +15,19 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.SalientComment { color: #00ffff; } -.LineNr { color: #444444; } -.traceContains { color: #008000; } -.traceAbsent { color: #c00000; } -.Delimiter { color: #800080; } -.Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; } -.cSpecial { color: #008000; } +.Constant { color: #00a0a0; } +.Special { color: #c00000; } .Conceal { color: #4e4e4e; } +.SalientComment { color: #00ffff; } .Comment { color: #9090ff; } .Comment a { color:#0000ee; text-decoration:underline; } -.Constant { color: #00a0a0; } -.Special { color: #c00000; } +.Delimiter { color: #800080; } +.LineNr { color: #444444; } .Identifier { color: #c0a020; } +.Normal { color: #aaaaaa; background-color: #080808; padding-bottom: 1px; } .PreProc { color: #800080; } +.cSpecial { color: #008000; } +.traceContains { color: #008000; } --> @@ -310,10 +309,10 @@ if ('onhashchange' in window) { 245 trace(2, "run") << "compare reg EAX and imm32 0x" << HEXWORD << arg2 << end(); 246 int32_t tmp1 = arg1 - arg2; 247 SF = (tmp1 < 0); -248 ZF = (tmp1 == 0); +248 ZF = (tmp1 == 0); 249 int64_t tmp2 = arg1 - arg2; 250 OF = (tmp1 != tmp2); -251 trace(2, "run") << "SF=" << SF << "; ZF=" << ZF << "; OF=" << OF << end(); +251 trace(2, "run") << "SF=" << SF << "; ZF=" << ZF << "; OF=" << OF << end(); 252 break; 253 } 254 @@ -346,10 +345,10 @@ if ('onhashchange' in window) { 281 trace(2, "run") << "subop compare" << end(); 282 int32_t tmp1 = *arg1 - arg2; 283 SF = (tmp1 < 0); -284 ZF = (tmp1 == 0); +284 ZF = (tmp1 == 0); 285 int64_t tmp2 = *arg1 - arg2; 286 OF = (tmp1 != tmp2); -287 trace(2, "run") << "SF=" << SF << "; ZF=" << ZF << "; OF=" << OF << end(); +287 trace(2, "run") << "SF=" << SF << "; ZF=" << ZF << "; OF=" << OF << end(); 288 break; 289 } 290 @@ -431,52 +430,6 @@ if ('onhashchange' in window) { 366 *arg1 = arg2; 367 break; 368 } -369 -370 //:: jump -371 -372 :(scenario jump_rel8) -373 # op ModRM SIB displacement immediate -374 eb 05 # skip 1 instruction -375 05 00 00 00 01 -376 05 00 00 00 02 -377 +run: inst: 0x00000001 -378 +run: jump 5 -379 +run: inst: 0x00000008 -380 -run: inst: 0x00000003 -381 -382 :(before "End Single-Byte Opcodes") -383 case 0xeb: { // jump rel8 -384 int8_t offset = static_cast<int>(next()); -385 trace(2, "run") << "jump " << NUM(offset) << end(); -386 EIP += offset; -387 break; -388 } -389 -390 //: -391 -392 :(scenario jump_rel16) -393 # op ModRM SIB displacement immediate -394 e9 05 00 # skip 1 instruction -395 05 00 00 00 01 -396 05 00 00 00 02 -397 +run: inst: 0x00000001 -398 +run: jump 5 -399 +run: inst: 0x00000009 -400 -run: inst: 0x00000003 -401 -402 :(before "End Single-Byte Opcodes") -403 case 0xe9: { // jump rel8 -404 int16_t offset = imm16(); -405 trace(2, "run") << "jump " << offset << end(); -406 EIP += offset; -407 break; -408 } -409 :(code) -410 int16_t imm16() { -411 int16_t result = next(); -412 result |= (next()<<8); -413 return result; -414 } -- cgit 1.4.1-2-gfad0