Changes

Jump to: navigation, search

6502

231 bytes added, 22 September
/* Branch instructions and Interrupts */
== Branch instructions and Interrupts ==
The branch instructions have subtle interrupt polling behavior. Interrupts are always polled When executing a branch instruction, the 6502 checks for interrupts before fetching the second CPU operand (cycle (the operand fetch2), but not before the third CPU cycle on a taken branch.
Additionally, for If the branch is taken branches that cross a page boundary(i.e., the CPU decides to jump), it does not check for interrupts are polled again before proceeding unless the PCH fixup cyclebranch crosses a page boundary (like moving from memory address $01FF to $0200).
An If the branch crosses a page boundary, the CPU checks for interrupts once more before fixing the program counter. If an interrupt being is detected at either any of these polling points (including only being detected at before the first oneoperand fetch or the page boundary fixup) will trigger a , the CPU will handle the interruptimmediately, interrupting the branch execution.
<br>
8,324
edits