예제 #1
0
        private static void add_rm32_imm8(Emulator emu, ModRM modrm)
        {
            UInt32 rm32 = modrm.get_rm32(emu);
            UInt32 imm8 = (UInt32)emu.getSignedCode8(0);

            emu.eip += 1;
            modrm.set_rm32(emu, rm32 + imm8);
        }
예제 #2
0
        // opcode 0x8B
        public static void mov_r32_rm32(Emulator emu)
        {
            emu.eip += 1;
            ModRM modrm = new ModRM();

            modrm.Parse(emu);
            UInt32 rm32 = modrm.get_rm32(emu);

            modrm.set_r32(emu, rm32);
        }
예제 #3
0
        static void cmp_rm32_imm8(Emulator emu, ModRM modrm)
        {
            UInt32 rm32 = modrm.get_rm32(emu);
            UInt32 imm8 = (UInt32)emu.getSignedCode8(0);

            emu.eip += 1;
            UInt64 result = (UInt64)rm32 - (UInt64)imm8;

            emu.update_eflags_sub(rm32, imm8, result);
        }
예제 #4
0
        // 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);
        }
예제 #5
0
        private static void inc_rm32(Emulator emu, ModRM modrm)
        {
            UInt32 value = modrm.get_rm32(emu);

            modrm.set_rm32(emu, value + 1);
        }