private void MCT() { while (running) { clock.c_start(); cycle_count = 0; int prev_cycle = 0; exec_opc(false); B = b.get_word(Z.getHex()); B.setWord(B.hexToByte()); Z.setHex((ushort)(Z.getHex() + 1)); while (cycle_count < 13) { cycle_count += clock.get_cycle(); if (cycle_count != prev_cycle) { Console.WriteLine("Cycle n° : {0}", cycle_count); } prev_cycle = cycle_count; } } Console.WriteLine("AGC halted"); }
/// <summary> /// start (run) a previous AGC intialized (powered up) /// </summary> public void start() { if(!running) { clock.c_start(); cycle_count = 0; running = true; b = new BANK(false, FB, FEB.getHex(), AGC_File); Console.WriteLine("AGC Started"); B = b.get_word(Z.getHex()); B.setWord(B.hexToByte()); Z.setHex((ushort)(Z.getHex() + 1)); MCT(); } else { Console.WriteLine("AGC Halted."); } }