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

Function cpu_rst

core/cpu.c:400–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400static void cpu_rst(uint32_t address, bool stack, bool mode, bool mixed) {
401#ifdef DEBUG_SUPPORT
402 debug_record_call(cpu.registers.PC, cpu.L);
403#endif
404 cpu.cycles++;
405 if (mixed) {
406 if (cpu.ADL) {
407 cpu_push_byte_mode(cpu.registers.PCU, true);
408 cpu_push_byte_mode((cpu.MADL << 1) | cpu.ADL, true);
409 }
410 cpu_push_byte_mode(cpu.registers.PCH, stack);
411 cpu_push_byte_mode(cpu.registers.PCL, stack);
412 if (!cpu.ADL) {
413 cpu_push_byte_mode((cpu.MADL << 1) | cpu.ADL, true);
414 }
415 } else {
416 cpu_push_word(cpu.registers.PC);
417 }
418 cpu_prefetch(address, mode);
419}
420
421static void cpu_call(uint32_t address, bool mode, bool mixed) {
422#ifdef DEBUG_SUPPORT

Callers 2

cpu_interruptFunction · 0.85
cpu_executeFunction · 0.85

Calls 4

debug_record_callFunction · 0.85
cpu_push_byte_modeFunction · 0.85
cpu_push_wordFunction · 0.85
cpu_prefetchFunction · 0.85

Tested by

no test coverage detected