Difference between revisions of "OSBYTE &00"

From BeebWiki
Jump to: navigation, search
m
 
m (1 revision)
(No difference)

Revision as of 23:58, 28 August 2013

OSBYTE &00 (0) - Identify Host/Operating System

On entry, X=0  - Generate error giving host and OS type
          X<>0 - Return host/OS in X

On exit,  X=host/OS type:

 0 Electron
 1 BBC
 2 BBC B+
 3 Master 128
 4 Master ET
 5 Master Compact
 6 Arthur or RISC OS
 7 Springboard
 8 UNIX
29 Texas Instruments calculator
30 Amstrad CPC
31 Sinclair ZX Spectrum
32 IBM PC

Implementations

Early documentation refers to OSBYTE 0 as returning the OS version. As more systems were developed, it became more correct to refer to it returning a value indicating the host. For example, code running on a second processor will always be told what the I/O host is regardless of what the host is and what the second processor is.

See also

Jgharston 22:41, 6 September 2007 (BST)