示例#1
0
        public static bool FlagFromOpcodeY(this RegisterSet regSet, byte y)
        {
            switch (y)
            {
            case 0:     // nz
                return(!regSet.Flags.Z);

            case 1:     // z
                return(regSet.Flags.Z);

            case 2:     // nc
                return(!regSet.Flags.C);

            case 3:     // c
                return(regSet.Flags.C);

            case 4:     // po
                return(!regSet.Flags.PV);

            case 5:     // pe
                return(regSet.Flags.PV);

            case 6:     // p
                return(!regSet.Flags.S);

            case 7:     // m
                return(regSet.Flags.S);
            }

            throw new InvalidOperationException("Invalid Opcode.Y value.");
        }
示例#2
0
 internal Registers()
 {
     AlternateSet = new RegisterSet();
 }
示例#3
0
文件: Alu.cs 项目: obiwanjacobi/Zim80
 public Alu(RegisterSet primarySet)
 {
     _primarySet = primarySet;
 }