Difference between revisions of "OSBYTE"
(Added 6809 entries.) |
m (1 revision) |
(No difference)
|
Revision as of 23:58, 28 August 2013
OSBYTE performs various functions passing and returning up to two bytes of data.
Specification
6502 | Z80 | 6809 | PDP11 | 80x86 | 32016 | ARM | On entry: | On exit:'
|
A | A | A | R0 | AL | R1 | R0 | = function code | preserved, but see &83 and &84. |
X | L | X | R1 | BX | R2 | R1 | = first parameter | returned value |
Y | H | Y | R2 | CX | R3 | R2 | = second parameter if A>&7F, ignored and forced to &00 if A<&80 | returned value if A>&7F |
Cy | Cy | Cy | Cy | Cy | Cy | Cy | returned value if A>&7F |
Calling from BBC BASIC
- Escape is acknowledged with OSBYTE &7E
-
=EOF#ch
calls OSBYTE &7F -
ADVAL
calls OSBYTE &80 -
INKEY
calls OSBYTE &81 -
LOAD
,SAVE
,CHAIN
call OSBYTE &82 -
PAGE
is initialised with OSBYTE &83 -
HIMEM
is initialised with OSBYTE &84 -
MODE
calls OSBYTE &82 then OSBYTE &85 -
POS
andVPOS
call OSBYTE &86 -
=MODE
calls OSBYTE &87 - The error handler clears the VDU queue with OSBYTE &DA
Entry points
- BBC BASIC Entry Address: &FFF4
- 6502 Entry Address: &FFF4, vectors via &020A
- Z80 Entry Address: &FFF4, vectors via &FFF5
- 6809 Entry Address: &FFF4, vectors via &FFF5
- 80x86 Entry Address: INT &4B, vectors via 0000:012C
- 32000 Entry Address: SVC &06
- PDP-11 Entry Address: EMT 2
- ARM Entry Address: SWI &06 "OS_Byte", vector &06
Implementations
Any OSBYTE call not recognised by the operating system is passed to sideways ROMs. If no sideways ROM recognises the call, then X is returned set to &FF.
The *FX
command calls OSBYTE and generates the
Bad command error if it is not recognised.
See also
Jgharston 16:58, 6 November 2009 (UTC)