Date : Thu, 28 Feb 2008 10:39:57 +1100
From : msmcdoug@... (Mark McDougall)
Subject: BBC FPGA and B flags
Hi again,
Have corresponded with the 6502 core maintainer and we are currently
deciding how the B flag should operate. Pending this discussion he'll do a
fix and advise - hopefully within the next 24 hrs! :)
According to the MAME documentation, the (NMOS) 6502 *always* has the B flag
set in the P register. According to the code itself, it is set on reset, and
*never* set to 0 there-after. As is commonly accepted, in response to an
IRQ/NMI, the processor pushes P onto the stack with the B flag set to zero -
P.B is otherwise unaffected. Likewise in the MAME 6502 core, PLP and RTI
instructions both (also) set P.B. FWIW BRK pushes P with B flag set.
Regards,
--
| Mark McDougall | "Electrical Engineers do it
| <http://members.iinet.net.au/~msmcdoug> | with less resistance!"