Exemplo n.º 1
0
        public void StackTest()
        {
            PrivateObject param0 = new PrivateObject(new Z80(new Memory48K()));
            Z80_Accessor target = new Z80_Accessor(param0);
            target.Set16BitRegisters(0, 0x1234);
            Assert.IsTrue(target.B == 0x12
                && target.C == 0x34);

            target.SP = 0x504;
            target.PUSH_qq(0);

            Assert.IsTrue(target.Memory[0x503] == 0x12
                    && target.Memory[0x502] == 0x34
                    && target.SP == 0x502);

            target.LD_dd_nn(0);
            target.POP_qq(0);
            Assert.IsTrue(target.B == 0x12
                && target.C == 0x34
                && target.SP == 0x504);
        }
Exemplo n.º 2
0
 public void LD_dd_nnTest()
 {
     PrivateObject param0 = new PrivateObject(new Z80(new Memory48K()));
     Z80_Accessor target = new Z80_Accessor(param0);
     target.Memory[0] = 0x00;
     target.Memory[1] = 0x50;
     target.LD_dd_nn(2);
     Assert.IsTrue(target.Get16BitRegisters(2) == 0x5000, "Error: LD dd, nn");
 }