| 398 | } |
| 399 | |
| 400 | static 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 | |
| 421 | static void cpu_call(uint32_t address, bool mode, bool mixed) { |
| 422 | #ifdef DEBUG_SUPPORT |
no test coverage detected