Date : Tue, 26 Feb 2008 16:40:27 +0000 (GMT)
From : tommowalker@... (Tom Walker)
Subject: BBC FPGA Boots to BASIC... almost...
--- Fragula <fragula@...> wrote:
> Peter Coghlan wrote:
> > What I meant to say is if a BRK is executed setting the B flag, maybe it
> > never gets cleared again and things fall apart some number of IRQs later?
>
> IIRC - and its possible that I don't - the BRK handler should do
> something like:
> PHP
> PLA
> ;do AND or XOR magic to clear the break bit, but I canna remember which
> bit.
> PHA
> PLP
> in order to clear the BRK flag.
No need. The BRK flag doesn't actually exist in the CPU - it's only present
when the status is pushed, where it is clear for an IRQ and set at all other
times.
If the FPGA 6502 gets this wrong, that could be one problem. Another problem
could be if it fails to disable interrupts on a BRK - that might crash it
also.
Tom
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Inbox. http://uk.docs.yahoo.com/nowyoucan.html