示例#1
0
        public static Z80 LoadPC(int step)
        {
            var z = new Z80();

            z.PC = ((double)step).ToQuantity().ToScalar();
            return(z);
        }
示例#2
0
        public static Z80 operator /(Z80 left, Z80 right)
        {
            var l = new Z80();

            l.AF = left.AF / right.AF;
            return(l);
        }
示例#3
0
        /// <summary>
        /// Test method for returning array of objects
        /// handled in qs as a tuple containing the native objects
        /// </summary>
        /// <returns></returns>
        public static Z80[] GetProcessors()
        {
            Z80[] z = new Z80[5];

            Random r = new Random();

            for (int i = 0; i < 5; i++)
            {
                z[i] = new Z80()
                {
                    PC = r.NextDouble().ToQuantity().ToScalar()
                };
            }

            return(z);
        }
示例#4
0
 public QsValue AddHL(Z80 z80)
 {
     return(this.HL + z80.HL);
 }
示例#5
0
 public Z80 GetZ80(int pc, Z80 z)
 {
     return(new Z80 {
         PC = this.PC + z.PC
     });
 }