<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 16 Jun 2009 18:10:58 +0100
From   : mike@... (Mike Tomlinson)
Subject: Econet Rom version differences

In article <4A3771F7.9070409@...>, Andy Ford
<acorn@...> writes

>I'm not that well versed on the details, but if there is a quick couple 
>of commands I can type in to find out the size

The problem is that to do so, the ROM has to be selected and the
contents of the first few bytes from &8000 read and compared to those at
&A000, which excludes 'a couple of lines of BASIC'.

This (below, a nasty quickie I hacked out years ago to help out a mate
at computer club) will tell you (it could be _very_  much condensed), it
lists the ROMs and their sizes. It'll also tell you if the socket is
empty.

The first few lines setup a snippet of machine code to read a location
in ROM (using OSRDRM) and store it in zero page location &71.

The FOR-NEXT block steps through the ROMs. There is an OS copy of the
ROM type at &2A1 et seq.  This is 0 if the socket is empty. 

FNsize is called to see whether the ROM is 8k or 16k. It checks the ROM
size using a crude test; it only checks one byte.  To be more robust it
should check several.  Don't recall why I chose &8001 and &A001.

The next loop (using the variable a)  reads the locations from &8009
onwards and if it is printable, echoes it to the screen, and repeats
until it finds chr$0 (end of string) or an arbitrary limit of 30
characters.

Did post this to the list years ago but couldn't find it.


DIM mc% 100
P%=mc%
[OPT 2
.start
LDY &70
JSR &FFB9
STA &71
RTS
]
REM
FOR i=0 TO 15
?&70=i
i$=STR$i:IF LEN i$=0 i$="0"+i$
PRINT "rom ";i$;" ";
s%=i?&2A1
IF s%=0 PRINT SPC(6) "* no rom *":NEXT i
PRINT FNsize;
?&F6=9:?&F7=&80
REPEAT
CALL start
a=?&71
IF a>31 AND a <127 VDU a
?&F6=(?&F6)+1
UNTIL a=0 OR ?&F6=30
PRINT
NEXT i
REM
DEF FNsize
?&F6=1:?&F7=&80: CALL start
tem1%=?&71
?&F6=1:?&F7=&A0: CALL start
tem2%=?&71
IF tem1% = tem2% :=" (8k) " ELSE :=" (16k) "

-- 
(\__/)   
(='.'=)  Bunny says Windows 7 is Vi$ta reloaded.
(")_(")  http://imgs.xkcd.com/comics/windows_7.png
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>