OSBYTE

From BeebWiki

Jump to: navigation, search

OSBYTE performs various functions passing and returning up to two bytes of data.

Contents

Specification

On entry:
A = function code
X = first parameter
Y = second parameter if A>=&80, ignored and forced to be &00 if A<&80
On exit:
A = preserved
X If A<&80: X = returned value, X=&FF if unrecognised, Y, Cy undefined
XY If A>=&80: XY = returned value, X=&FF if unrecognised, Cy = returned Carry flag

Calling from BBC BASIC

Entry points

  • BBC BASIC Entry Address: &FFF4
  • 6502 Entry Address: &FFF4, vectors via &020A
  • Z80 Entry Address: &FFF4, vectors via &FFF5
  • 6809 Entry Address:
  • 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.

Jgharston 06:21, 8 October 2007 (BST)

Personal tools