mirror of
https://github.com/fadden/6502bench.git
synced 2025-01-04 16:33:52 +00:00
Clarify BRK explanation
This commit is contained in:
parent
14ecad0849
commit
e79064709c
@ -939,8 +939,12 @@ namespace Asm65 {
|
||||
Mnemonic = OpName.BRK,
|
||||
Effect = FlowEffect.NoCont,
|
||||
BaseMemEffect = MemoryEffect.None,
|
||||
// On 6502/65C02 this also affects the 'B' flag, which overlaps with X. Nobody
|
||||
// really cares though. On 6502 this doesn't clear the 'D' flag.
|
||||
// On 6502 this doesn't clear the 'D' flag. Easier to explain that in text than
|
||||
// create a separate definition.
|
||||
//
|
||||
// The processor status flags have the 'B' flag set on 6502/65C02/65816 emu mode
|
||||
// when pushed onto the stack, but it doesn't affect the actual processor status
|
||||
// flag in the code executed next.
|
||||
//
|
||||
// We don't set a StatusFlagUpdater because the flags are only changed for the
|
||||
// software break handler function. If we could actually track this into that,
|
||||
|
@ -286,7 +286,12 @@ namespace Asm65 {
|
||||
{ OpName.BRK,
|
||||
"Pushes state onto the stack, and jumps to the software break vector at " +
|
||||
"$fffe-ffff. While this is technically a single-byte instruction, the " +
|
||||
"program counter pushed onto the stack is incremented by two."
|
||||
"program counter pushed onto the stack is incremented by two. The interrupt " +
|
||||
"flag is set, and on 65C02/65816 the D flag is cleared. " +
|
||||
"On 6502, 65C02, and 65816 in emulation mode, the status flags pushed onto " +
|
||||
"the stack will have the 'B' flag (which overlaps the 'X' flag) set so the " +
|
||||
"interrupt handler can tell the difference between hardware and software " +
|
||||
"interrupts."
|
||||
},
|
||||
{ OpName.BRL,
|
||||
"Branches to a long relative address."
|
||||
|
Loading…
Reference in New Issue
Block a user