public VM() { isRunning = true; mmu = new MMU(); cpu = new CPU(ref mmu); cpu.AddSysCallback(0x6, Print); cpu.AddSysCallback(0xB, ChangeForeground); cpu.AddSysCallback(0xC, ChangeBackground); }
public CPU(ref MMU InMmu) { pc = 0; lastop = 0; cycles = 0; registers = new Registers(); exit = false; mmu = InMmu; stack = new Stack <qbyte>(); callstack = new Stack <qbyte>(); syscallbacks = new Dictionary <qbyte, Action>(); }