about summary refs log tree commit diff stats
path: root/subx/011direct_addressing.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-14 23:33:27 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-14 23:35:00 -0700
commit311297cb006201f4706704b32c762630806c7adb (patch)
treeeacf64f46008fd48caf898d583a8bdac986b0baf /subx/011direct_addressing.cc
parentc67ca4b92674620f3cae3b9301471e0321a7936c (diff)
downloadmu-311297cb006201f4706704b32c762630806c7adb.tar.gz
4066
I spent a while spelunking into the code generated by C compilers before
realizing that ignoring the order of arguments for 'cmp' instructions
clarifies everything.
Diffstat (limited to 'subx/011direct_addressing.cc')
-rw-r--r--subx/011direct_addressing.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/011direct_addressing.cc b/subx/011direct_addressing.cc
index facc8378..a12b5541 100644
--- a/subx/011direct_addressing.cc
+++ b/subx/011direct_addressing.cc
@@ -161,7 +161,7 @@ case 0xf7: {  // xor r32 with r/m32
 +run: SF=0; ZF=0; OF=0
 
 :(before "End Single-Byte Opcodes")
-case 0x39: {  // compare r32 with r/m32
+case 0x39: {  // set SF if r/m32 < r32
   uint8_t modrm = next();
   uint8_t reg2 = (modrm>>3)&0x7;
   trace(2, "run") << "compare reg " << NUM(reg2) << " with effective address" << end();