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

MLI() private method

private MLI ( ushort operand ) : void
operand ushort
return void
        private void MLI(ushort operand)
        {
            ushort value;
            RegGeneral destination;
            try {
                BitPatternALU(operand, out value, out destination);
                R[(int)destination] = 0xFFFE;
                value = 0x8000;
                int result = (short)R[(int)destination] * (short)value;
                R[(int)RegGeneral.R0] = (ushort)(result >> 16);
                FL_C = R[(int)RegGeneral.R0] != 0;
                R[(int)destination] = (ushort)(result & 0x0000FFFF);
                FL_N = (result & 0x80000000) != 0;
                FL_Z = result == 0;
                // V [Overflow] Not effected.
            }
            catch (SegFaultException e) {
                Interrupt_SegFault(e.SegmentType, operand, e.Address);
            }
        }