public void ZeroTest() { // 8-bit Load group PrivateObject param0 = new PrivateObject(new Z80(new Memory48K())); Z80_Accessor target = new Z80_Accessor(param0); target.I = 3; target.LD_A_I(); Assert.IsTrue((target.F & Flag.Zero) != Flag.Zero); target.I = 0; target.LD_A_I(); Assert.IsTrue((target.F & Flag.Zero) == Flag.Zero); target.R = 3; target.LD_A_R(); Assert.IsTrue((target.F & Flag.Zero) != Flag.Zero); target.R = 0; target.LD_A_R(); Assert.IsTrue((target.F & Flag.Zero) == Flag.Zero); // Search Group target.A = 3; target.Set16BitRegisters(2, 0x1000); target.Memory[0x1000] = 3; target.CPI(); Assert.IsTrue((target.F & Flag.Zero) == Flag.Zero); target.A = 4; target.CPI(); Assert.IsTrue((target.F & Flag.Zero) != Flag.Zero); }
public void LD_A_RTest() { PrivateObject param0 = new PrivateObject(new Z80(new Memory48K())); Z80_Accessor target = new Z80_Accessor(param0); target.R = 129; target.LD_A_R(); Assert.IsTrue(target.A == 131); }