예제 #1
0
 public static void ReportRegs(CodeEngine engine)
 {
     Console.WriteLine("\n=== New Code Engine State ====");
     Console.WriteLine("PC: " + engine.Read1802Register(5).ToString("x"));
     Console.WriteLine("Timers: " + engine.Read1802Register(8).ToString("x"));
     Console.WriteLine("Address Register: " + engine.Read1802Register(10).ToString("x"));
     Console.WriteLine("==============================\n");
 }
예제 #2
0
 public static void DumpRegs(ushort address, CodeEngine engine, ushort d, ushort p, ushort x, ushort t, ushort df)
 {
     Console.WriteLine("\n======== Register State (" + address.ToString("x") + ") =========");
     Console.WriteLine("Register D: " + d.ToString("x"));
     Console.WriteLine("Register P: " + p.ToString("x"));
     Console.WriteLine("Register X: " + x.ToString("x"));
     Console.WriteLine("Register T: " + t.ToString("x"));
     Console.WriteLine("Register DF: " + df.ToString("x"));
     Console.WriteLine("Register R0: " + engine.Read1802Register(0).ToString("x"));
     Console.WriteLine("Register R1: " + engine.Read1802Register(1).ToString("x"));
     Console.WriteLine("Register R2: " + engine.Read1802Register(2).ToString("x"));
     Console.WriteLine("Register R3: " + engine.Read1802Register(3).ToString("x"));
     Console.WriteLine("Register R4: " + engine.Read1802Register(4).ToString("x"));
     Console.WriteLine("Register R5: " + engine.Read1802Register(5).ToString("x"));
     Console.WriteLine("Register R6: " + engine.Read1802Register(6).ToString("x"));
     Console.WriteLine("Register R7: " + engine.Read1802Register(7).ToString("x"));
     Console.WriteLine("Register R8: " + engine.Read1802Register(8).ToString("x"));
     Console.WriteLine("Register R9: " + engine.Read1802Register(9).ToString("x"));
     Console.WriteLine("Register RA: " + engine.Read1802Register(10).ToString("x"));
     Console.WriteLine("Register RB: " + engine.Read1802Register(11).ToString("x"));
     Console.WriteLine("Register RC: " + engine.Read1802Register(12).ToString("x"));
     Console.WriteLine("Register RD: " + engine.Read1802Register(13).ToString("x"));
     Console.WriteLine("Register RE: " + engine.Read1802Register(14).ToString("x"));
     Console.WriteLine("Register RF: " + engine.Read1802Register(15).ToString("x"));
     Console.WriteLine("=================================\n");
 }