Example #1
0
        private void Cmp8Imm8(Reg8 reg)
        {
            var regValue = registers.Get(reg);
            var immValue = _memory[_ip + 1];

            flagsRegister.SetFlagsFromInputAndResult(regValue - immValue, regValue, immValue);
            _ip += 2;
        }
Example #2
0
        public void RmResult(Func <ushort, uint, uint> function, bool rmFirst, bool useResult)
        {
            var r1Value  = registers.Get(decoder.R1, RegisterType);
            var memValue = ReadMemory();
            var res      = function(r1Value, memValue);

            flagsRegister.SetFlagsFromInputAndResult((int)res, r1Value, memValue, RegisterType.ToNumBytes());
            if (useResult)
            {
                RmFunc(res, rmFirst);
            }
        }