// opcode 0x89 public static void mov_rm32_r32(Emulator emu) { emu.eip += 1; ModRM modrm = new ModRM(); modrm.Parse(emu); UInt32 r32 = modrm.get_r32(emu); modrm.set_rm32(emu, r32); }
// opcode 0x3B public static void cmp_r32_rm32(Emulator emu) { emu.eip += 1; ModRM modrm = new ModRM(); modrm.Parse(emu); UInt32 r32 = modrm.get_r32(emu); UInt32 rm32 = modrm.get_rm32(emu); UInt64 result = (UInt64)r32 - (UInt64)rm32; emu.update_eflags_sub(r32, rm32, result); }