Пример #1
0
        // opcode 0xEB
        public static void short_jump(Emulator emu)
        {
            SByte diff = (SByte)emu.getSignedCode8(1);

            emu.eip += (UInt32)(diff + 2);
        }
Пример #2
0
        private static void inc_rm32(Emulator emu, ModRM modrm)
        {
            UInt32 value = modrm.get_rm32(emu);

            modrm.set_rm32(emu, value + 1);
        }
Пример #3
0
        // opcode 0xE9
        public static void near_jump(Emulator emu)
        {
            Int32 diff = emu.getSignedCode32(1);

            emu.eip += (UInt32)(diff + 5);
        }
Пример #4
0
 // opcode 0xC3
 public static void ret(Emulator emu)
 {
     emu.eip = emu.pop32();
 }
Пример #5
0
        // opcode 0x7E
        public static void jle(Emulator emu)
        {
            int diff = emu.eflags.HasFlag(Eflags.ZERO) || (emu.eflags.HasFlag(Eflags.SIGN) != emu.eflags.HasFlag(Eflags.OVERFLOW)) ? emu.getSignedCode8(1) : 0;

            emu.eip += (uint)(diff + 2);
        }
Пример #6
0
        // opcode 0x79
        public static void jns(Emulator emu)
        {
            int diff = emu.eflags.HasFlag(Eflags.SIGN) ? 0 : emu.getSignedCode8(1);

            emu.eip += (uint)(diff + 2);
        }
Пример #7
0
        // opcode 0x74
        public static void jz(Emulator emu)
        {
            int diff = emu.eflags.HasFlag(Eflags.ZERO) ? emu.getSignedCode8(1) : 0;

            emu.eip += (uint)(diff + 2);
        }