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

AND() private method

private AND ( ushort operand ) : void
operand ushort
return void
        private void AND(ushort operand)
        {
            ushort value;
            RegGeneral destination;
            try {
                BitPatternALU(operand, out value, out destination);
                int result = R[(int)destination] & value;
                R[(int)destination] = (ushort)(result & 0x0000FFFF);
                FL_N = (result & 0x8000) != 0;
                FL_Z = result == 0x0000;
                // C [Carry] Not effected.
                // V [Overflow] Not effected.
            }
            catch (SegFaultException e) {
                Interrupt_SegFault(e.SegmentType, operand, e.Address);
            }
        }