Ypsilon.Emulation.Processor.YCPU.RNR C# (CSharp) Method

RNR() private method

private RNR ( ushort operand ) : void
operand ushort
return void
        private void RNR(ushort operand)
        {
            ushort value;
            RegGeneral destination;
            BitPatternSHF(operand, out value, out destination);
            if (value != 0) {
                uint register = (uint)(R[(int)destination] >> value);
                uint lo_mask = (uint)0x0000FFFF >> (16 - value);
                uint lo_bits = (R[(int)destination] & lo_mask) << (16 - value);
                R[(int)destination] = (ushort)((register & 0x0000FFFF) | lo_bits);
                // C [Carry]       Not effected.
                // V [Overflow]    Not effected.
            }
            FL_N = (R[(int)destination] & 0x8000) != 0;
            FL_Z = R[(int)destination] == 0x0000;
        }