public virtual void TestDataRegs() { for (int r = 0; r < 7; r++) { cpu.SetDataRegisterByte(r, 0xaa); Assert.Equal(0xaa, cpu.GetDataRegisterByte(r)); Assert.Equal(0xaa, cpu.GetDataRegisterWord(r)); Assert.Equal(0xaa, cpu.GetDataRegisterLong(r)); Assert.Equal(-86, cpu.GetDataRegisterByteSigned(r)); Assert.Equal(170, cpu.GetDataRegisterWordSigned(r)); cpu.SetDataRegisterWord(r, 0xa5a5); Assert.Equal(0xa5, cpu.GetDataRegisterByte(r)); Assert.Equal(0xa5a5, cpu.GetDataRegisterWord(r)); Assert.Equal(0xa5a5, cpu.GetDataRegisterLong(r)); Assert.Equal(-91, cpu.GetDataRegisterByteSigned(r)); Assert.Equal(-23131, cpu.GetDataRegisterWordSigned(r)); cpu.SetDataRegisterLong(r, -2054847099); Assert.Equal(0x85, cpu.GetDataRegisterByte(r)); Assert.Equal(0x8585, cpu.GetDataRegisterWord(r)); Assert.Equal(-2054847099, cpu.GetDataRegisterLong(r)); Assert.Equal(-123, cpu.GetDataRegisterByteSigned(r)); Assert.Equal(-31355, cpu.GetDataRegisterWordSigned(r)); cpu.SetDataRegisterLong(r, 305419896); Assert.Equal(0x78, cpu.GetDataRegisterByte(r)); Assert.Equal(0x5678, cpu.GetDataRegisterWord(r)); Assert.Equal(305419896, cpu.GetDataRegisterLong(r)); Assert.Equal(0x78, cpu.GetDataRegisterByteSigned(r)); Assert.Equal(0x5678, cpu.GetDataRegisterWordSigned(r)); } }