<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 07 Oct 1998 20:40:40 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: Acorn database

> > A friend was running this (it is the original Database not the later
> > Viewstore) on a BBC B until it expired.
> > He has now tried to run this on a B+ (64k) but it is throwing up an
> > error message saying it 'not a BBC'.
> It's probably reading the OS version using a *FX0 and expecting to see
> OS1.20.
 
You mean Osbyte0,<>0.  You can't get a return value from a *FX call.
Calling Osbyte0 with X=0 generates an error with the string containing the
version of the MOS, eg 'OS 1.20'.  Calling Osbyte0 with X<>0 returns the
host value in X.  OS 1.20 (BBC B) returns X=1.
 
'OS version' is a subset of 'host value'.
 
> I also seem to remember there was another method of determining the OS
> release (apart from *FX0) but cannot remember what it was.
 
If you have found the host from Osbyte 0 (or you can guarantee that the
program will always ever be running on a system that returns the same host
value), then you can find the varient of the host with INKEY-256,
Osbyte129,&FF00.
 
I've got a little utility somewhere that patches Osbyte0 and makes it
return whatever value you want.  If the moderator allows, I'll post it
here, it'll be about 30 bytes or so, 50 or 60 characters encoded.
 
File :USERS.Text.Misc4.OS.OSVers
----8<----
Osbyte0 returns what type of host hardware you are connected to. INKEY-256
tells you what varient of that host hardware it is.  If it is implicit in
the program you are writing what the host hardware is (eg a RISC-OS
Wimp-based application which implies it must be on host hardware 6), then
you can reasonably neglect asking Osbyte0,<>0 what the host hardware is
and go straight to asking what varient it is with INKEY-256.
 
Host  Host Hardware Varient
fx0:  INKEY-256 low byte:
 -1   ---  Unknown
error &00: BBC OS 0.10
  0   &01: Electron
  1   &FF: BBC OS 1.00/1.20
      &FE: BBC OS 1.10 (US)
      &FC: BBC OS 1.20 (Germany)
  2   &FB: BBC B+ OS 2.00
      &FF: Reuters Terminal (UK) (switchable with *UK)
      &FE: Reuters Terminal (US) (switchable with *US)
  3   &FD: Master OS 3.20
  4   &F7: Master ET OS 4.00
  5   &F5: Master Compact
  6   &A0: Archimedes Arthur 1.20
      &A1: Archimedes RISC-OS 2.00
      &A2: Archimedes RISC-OS 2.01
      &A3: Archimedes RISC-OS 3.00
      &A4: Archimedes RISC-OS 3.1x
      &A5: Archimedes RISC-OS 3.5x
      &A6: Archimedes RISC-OS 3.6x
      &A7: Archimedes RISC-OS 3.7x
      &A8: by extrapolation, I assume: Archimedes RISC-OS 4.00/Pheobe
      (ie, arc%=(INKEY-256 AND&F0)=&A0 )
  7   ???: Springboard   (An ARM-based development thing plugged into a PC)
  8   ???: UNIX
 30   &Dx: Amstrad 464/664/6128, etc.
 31   &Ex: Spectrum
 32   **** IBM-type PC (INKEY-256 not available)
 
Some sources quote returning X=0 with BBC B MOS 0.xx, but that's incorrect
as Osbyte 0 always returned with an error message describing the version
in MOS 0.xx (eg "EPROM OS 0.10"), it would never return a value.
 
INKEY-256 also returns:
      &FA: Acorn Business Computer OS
but I'm not sure what MOS version returns this; I think it's either 1 or
2, or probably both.
 
I'm not sure what varients OS 7 (Springboard) returns as I've never been
able to find out.  I don't know what OS 8 (Unix) returns as, unbelievably,
I never thought to find out when I had the chance!  [I've now got some
more documents, so it may be in there.]
 
When I was putting together a system to run BBCBasic(80) on the Amstrad
and Spectrum, I picked 30 and 31 as BBCBasic(86) returns 32.  I was
intending to get INKEY-256 to return the varient of the hardware by
interrogating the firmware somehow.  I never properly got around to it.  I
think the Spectrum returned &Ex and the Amstrad &Dx.  I'll have to dig the
code out and have a look.
----8<----
 
-- 
J.G.Harston (JGH BBC PD Library) 70 Camm Street, Walkley, SHEFFIELD S6 3TR
BBC+Master / Z80+6502 / CoPro+Tubes / Econet+SJ / Devolution / Transport /
Planning / Highways -- jgh@...                -- Message files <20k please
              'setup' is a noun  --  'set up' is a verb
-- 
    ___  ___  ___  ___  ___  ___   |  Free Internet E-mail and Usenet News  | 
|  /   \/   \/   \/   \/   \/   \  | +44 181 654 2212 also +44 181 655 4412 |
|    A    R    C    A    D    E    |   Croydon  UK  -  Fidonet#2:254/27.0   |
|     The Definitive Acorn BBS     | http://arcade.demon.co.uk  at weekends |
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>