Difference between revisions of "OSBYTE &00"

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

Revision as of 01:13, 8 March 2015

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
29 Texas Instruments calculator
30 Amstrad CPC
31 Sinclair ZX Spectrum


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)