Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #4
0
 internal static void WordAt(Cpu.Cpu cpu, string ofs, string octal)
 {
     Assert.WordAt(cpu, ofs.AsOctal(), octal.AsOctal());
 }
Exemple #5
0
 internal static void Reg(Cpu.Cpu cpu, int rn, string octal)
 {
     Assert.Reg(cpu, rn, octal.AsOctal());
 }
Exemple #6
0
 internal static void PC(Cpu.Cpu cpu, string value)
 {
     Assert.PC(cpu, value.AsOctal());
 }
Exemple #7
0
 internal static void PC(Cpu.Cpu cpu, ushort value)
 {
     Assert.Reg(cpu, 7, value);
 }