public virtual void TestAddrRegs() { for (int r = 0; r < 7; r++) { cpu.SetAddrRegisterByte(r, 0xaa); Assert.Equal(0xaa, cpu.GetAddrRegisterByte(r)); Assert.Equal(0xaa, cpu.GetAddrRegisterWord(r)); Assert.Equal(0xaa, cpu.GetAddrRegisterLong(r)); Assert.Equal(-86, cpu.GetAddrRegisterByteSigned(r)); Assert.Equal(170, cpu.GetAddrRegisterWordSigned(r)); cpu.SetAddrRegisterWord(r, 0xa5a5); Assert.Equal(0xa5, cpu.GetAddrRegisterByte(r)); Assert.Equal(0xa5a5, cpu.GetAddrRegisterWord(r)); Assert.Equal(0xa5a5, cpu.GetAddrRegisterLong(r)); Assert.Equal(-91, cpu.GetAddrRegisterByteSigned(r)); Assert.Equal(-23131, cpu.GetAddrRegisterWordSigned(r)); cpu.SetAddrRegisterLong(r, -2054847099); Assert.Equal(0x85, cpu.GetAddrRegisterByte(r)); Assert.Equal(0x8585, cpu.GetAddrRegisterWord(r)); Assert.Equal(-2054847099, cpu.GetAddrRegisterLong(r)); Assert.Equal(-123, cpu.GetAddrRegisterByteSigned(r)); Assert.Equal(-31355, cpu.GetAddrRegisterWordSigned(r)); cpu.SetAddrRegisterLong(r, 305419896); Assert.Equal(0x78, cpu.GetAddrRegisterByte(r)); Assert.Equal(0x5678, cpu.GetAddrRegisterWord(r)); Assert.Equal(305419896, cpu.GetAddrRegisterLong(r)); Assert.Equal(0x78, cpu.GetAddrRegisterByteSigned(r)); Assert.Equal(0x5678, cpu.GetAddrRegisterWordSigned(r)); } }