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

Function cpu_call

core/cpu.c:421–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421static void cpu_call(uint32_t address, bool mode, bool mixed) {
422#ifdef DEBUG_SUPPORT
423 debug_record_call(cpu.registers.PC, cpu.L);
424#endif
425 if (mixed) {
426 bool stack = cpu.IL || (cpu.L && !cpu.ADL);
427 cpu.registers.R += cpu.IL << 1;
428 if (cpu.ADL) {
429 cpu_push_byte_mode(cpu.registers.PCU, true);
430 if (!cpu.IL) {
431 cpu_push_byte_mode((cpu.MADL << 1) | cpu.ADL, true);
432 }
433 }
434 cpu_push_byte_mode(cpu.registers.PCH, stack);
435 cpu_push_byte_mode(cpu.registers.PCL, stack);
436 if (cpu.IL || !cpu.ADL) {
437 cpu_push_byte_mode((cpu.MADL << 1) | cpu.ADL, true);
438 }
439 } else {
440 cpu_push_word(cpu.registers.PC);
441 }
442 cpu_prefetch(address, mode);
443}
444
445static void cpu_interrupt(uint32_t address) {
446 cpu_rst(address, cpu.ADL, cpu.ADL | cpu.MADL, cpu.MADL);

Callers 1

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