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-type system (DOS, Windows, etc.)
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.
Jgharston 22:41, 6 September 2007 (BST)