<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 16 Nov 1994 08:44:53 +0000 (GMT)
From   : Peter Coghlan <PETER@...>
Subject: Re: Brk handling (Was Re: Undocumented Opcodes,)

On Tue, 15 Nov 1994 14:33:10 +0000 (GMT) you said:
 
>Just another question...
>Has anyone out there had any problems with the BRK instruction
>when executing *FX 0 from BASIC?
>I know BRK is used to write out the startup banner, but
>the emulator crashes when it trys to do *FX 0 and I have traced
>the ROM as far as BRK, then further until it JSR &8003 to the
>preferred language ROM
>
 
Before handing control over to the current language, the OS informs all paged
roms via their service entry (8003) when a BRK is encountered. Basic does
not have a service entry so is probably choking at this point. The OS checks
whether a rom has a service entry before calling it and will not attempt to
call Basic in this way. If you have sideways roms implemented, perhaps there
is a bug in the implementation. If not, its hard to guess where the problem is.
 
Bit 7 of the rom status byte (8006 I think) indicates a service entry exists.
Os 1.2 hold copies of each roms status byte in page D and uses the sequence
DEC D??,X, INC D??,X to check bit 7. It might be worth checking that
DEC absolute,X and INC absolute,X are setting the N flag correctly.
 
                            Peter.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>