Date : Sun, 22 Sep 2002 15:38:19 +0100
From : "Richard Gellman" <r.gellman@...>
Subject: Re: BBC B with edge-connectors instead of IDC connectors?
[unimportant info deleted]
>>As FE30 is readonly,any interrupt routine which feels it necessary to
jiggle
>>the ROMs around reads and stacks F4.On exit from the interrupt handler it
>>pulls and writes to *both* F4 and FE30,hence my comment about writing to
F4
>>*first* and not bothering to disable IRQs,
>
>Yes, but oftentimes it's 'not bothering' that causes the most
>obscure of crashes. ?&F4 is simply meant to reflect the contents
>of ROMSEL *at all times*, even during interrupts. You simply do
>not, and should not, know what is being done in any interrupt
>routines that happen to run while you're switching ROMs.
Well, as a few people have said, its very true that whats going on in an
interrupt is unknown, and although the stock OS is behaving well and doing
things right, any third-party ROMs you have installed might not, and there
is a possibility that naughty ROMs (or indeed any other code that might be
patched into the interrupt routines) will manage to screw up the ROMSELect
system.
Point of note on ROMSEL: Someone said it was read only. Well um, ROMSEL is a
select register, so it can never be read only :) But my point was that
interestingly, on the Model B it seems to be _write_ only, i.e. it CANT be
read at all. You can read it on a Master 128 though.
And to finish off, there is a section in the more technical part of the
Master 128 Reference Manual (Part 1) on how to access the 4K segment of
Private RAM (Its actually for the most part the VDU Driver's workspace) that
lies under the Paged ROMs at &8000 to &8FFF. It involves setting the top bit
of ROMSEL (Called the RAM bit) to a 1. And it specifically states to disable
interrupts before doing anything, and to re-enable them when you're done.
But more interesting for the user side, if you disable interrupts, the
memory copy works a bit faster :)
-- Richard