示例#1
0
        internal static void WordAt(Cpu.Cpu cpu, int ofs, ushort expected)
        {
            ushort actual = (ushort)((cpu.PhysicalMemory[ofs + 1] << 8) | cpu.PhysicalMemory[ofs]);
            string message = "Assert.WordAt: M[" + ofs.ToString() + "] == " + actual.ToString() + " != " + expected.ToString();

            Assert.AreEqual(actual, expected, message: message);
        }
示例#2
0
        internal static void Reg(Cpu.Cpu cpu, int rn, ushort expected)
        {
            ushort actual = cpu.Registers[rn];
            string message = "Assert.Reg: r" + rn.ToString() + " == " + actual.ToString() + " != " + expected.ToString();

            Assert.AreEqual(actual, expected, message: message);
        }
示例#3
0
        internal static void ByteAt(Cpu.Cpu cpu, int ofs, byte expected)
        {
            byte actual = cpu.PhysicalMemory[ofs];
            string message = "Assert.ByteAt: M[" + ofs.ToString() + "] == " + actual.ToString() + " != " + expected.ToString();

            Assert.AreEqual(actual, expected, message: message);
        }
示例#4
0
 internal static void WordAt(Cpu.Cpu cpu, string ofs, string octal)
 {
     Assert.WordAt(cpu, ofs.AsOctal(), octal.AsOctal());
 }
示例#5
0
 internal static void Reg(Cpu.Cpu cpu, int rn, string octal)
 {
     Assert.Reg(cpu, rn, octal.AsOctal());
 }
示例#6
0
 internal static void PC(Cpu.Cpu cpu, string value)
 {
     Assert.PC(cpu, value.AsOctal());
 }
示例#7
0
 internal static void PC(Cpu.Cpu cpu, ushort value)
 {
     Assert.Reg(cpu, 7, value);
 }