示例#1
0
        public static (ushort Result, Flags Flags) Subtract(ushort left, ushort right, bool carry, bool setSZPV, Flags currentFlags)
        {
            Flags flags = FlagLookup.WordArithmeticFlags(currentFlags, left, right, carry, setSZPV, true);

            return((ushort)(left - right - (carry ? 1 : 0)), flags);
        }
示例#2
0
        public static (ushort Result, Flags Flags) Add(ushort left, ushort right, bool carry, bool setSZPV, Flags currentFlags)
        {
            Flags flags = FlagLookup.WordArithmeticFlags(currentFlags, left, right, carry, setSZPV, false);

            return((ushort)(left + right + (carry ? 1 : 0)), flags);
        }