Difference between revisions of "OSBYTE &00"

From BeebWiki
Jump to: navigation, search
m (Added Commodore.)
m (Tweeked formatting.)
Line 1: Line 1:
 
[[Category:OSBYTE]]
 
[[Category:OSBYTE]]
OSBYTE &00 (0) - Identify Host/Operating System
+
===OSBYTE &00 (0) - Identify Host/Operating System===
 
  On entry, X=0  - Generate error giving host and OS type
 
  On entry, X=0  - Generate error giving host and OS type
 
           X<>0 - Return host/OS in X
 
           X<>0 - Return host/OS in X
Line 14: Line 14:
 
   6 Arthur or RISC OS
 
   6 Arthur or RISC OS
 
   7 Springboard
 
   7 Springboard
   8 UNIX
+
   8 UNIX or UNIX-type system
 
  28 Commodore 64/128
 
  28 Commodore 64/128
 
  29 Texas Instruments calculator
 
  29 Texas Instruments calculator

Revision as of 23:23, 15 February 2016

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 or UNIX-type system
28 Commodore 64/128
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)