Date : Mon, 12 Sep 2005 23:53:10 +0100
From : jgh@... (Jonathan Graham Harston)
Subject: Re: checking ROMS.
Sprow <info@...> wrote:
> Jonathan Graham Harston <jgh@...> wrote:
>
> > > IF Y%?&2A1=0 := "(vacant)"
>
> Could use OSByte 170/171 to read the ROM info table base rather than
> assuming it is &2A1.
Every 8-bit system has the ROM table at &2A1, so it's fairly safe
to address it directly if running in the I/O processor. I saw
quite a lot of code in the 1980s (including some Acorn code) that
address &2A1 directly.
> > !&F6=A%:B%=(USR&FFB9)AND&FF
>
> Please don't use ! on &F6, as that will nuke &F8/F9 too. OK, so they're not
> used on the BBC B, but they are on the Master,
&F8/9 were specifically put to one side so that !&F6 could be
used. &F8/9 became the function key expansion pointer on the
Compact, so yes, using !&F6 has side effects if you use it when a
function key is being expanded.
Even then, if you call OSRDRM in a function, as recommended, with:
DEFFNrdrm(!&F6,Y%)=(USR&FFB9)AND&FF
then the contents of &F8/9 are restored on exit anyway and there
are no side effects.
--
J.G.Harston - jgh@... - mdfs.net/User/JGH
RISC OS Internationalisation - http://mdfs.net/Software/RISCOS