MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / cpu_halt

Function cpu_halt

core/cpu.c:866–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864}
865
866static void cpu_halt(void) {
867 cpu.halted = true;
868 cpu_restore_next();
869#ifdef DEBUG_SUPPORT
870 while (cpu.cycles < cpu.next && !cpu.IEF1 && debug.step) {
871 cpu.haltCycles++;
872 cpu.cycles++;
873 debug_open(DBG_FROZEN, cpu.registers.PC);
874 }
875#endif
876 if (cpu.cycles < cpu.next) {
877 cpu.haltCycles += cpu.next - cpu.cycles;
878 cpu.cycles = cpu.next; /* consume all of the cycles */
879 }
880}
881
882void cpu_restore_next(void) {
883 if (cpu.NMI || (cpu.IEF1 && (intrpt->status & intrpt->enabled)) || cpu_check_signals() != CPU_SIGNAL_NONE) {

Callers 1

cpu_executeFunction · 0.85

Calls 2

cpu_restore_nextFunction · 0.85
debug_openFunction · 0.85

Tested by

no test coverage detected