Difference between revisions of "OSWORD"

From BeebWiki
Jump to: navigation, search
m (1 revision)
(calls &E0..&FF available to user)
Line 27: Line 27:
 
of parameters to receive in the second byte of the parameter block,
 
of parameters to receive in the second byte of the parameter block,
 
inclusive of the first two bytes.
 
inclusive of the first two bytes.
 +
 +
OSWORD calls with numbers &E0 to &FF are "available for use by the user".<ref
 +
name="sadek">R.I.M. Sadek (1986),
 +
''The complete disc manual for the BBC Microcomputer'', Macmillan Education
 +
Ltd. p.107.</ref> They are indirected via [[USERV]] on the 6502 I/O
 +
processor.<ref name="sadek" /><ref name="appnote-004">Acorn Computers (June
 +
1992), ''Application note 004: Tube application note'', p.5.</ref>
  
 
==Calling from BBC BASIC==
 
==Calling from BBC BASIC==
Line 52: Line 59:
 
* http://mdfs.net/Docs/Comp/BBC/Oswords
 
* http://mdfs.net/Docs/Comp/BBC/Oswords
 
* http://mdfs.net/Docs/Comp/BBC/Osword
 
* http://mdfs.net/Docs/Comp/BBC/Osword
 +
 +
==References==
 +
<references />
  
 
[[User:Jgharston|Jgharston]] 17:03, 6 November 2009 (UTC)
 
[[User:Jgharston|Jgharston]] 17:03, 6 November 2009 (UTC)

Revision as of 17:54, 10 April 2020

Miscellaneous actions with a control block

Specification

 6502   Z80   6809   PDP11   80x86   32016   ARM  On entry: On exit:
A A A R0 AL R1 R0 = function code   undefined
XY HL X R1 BX R2 R1 =>control block   undefined, control block updated
Control block for calls>&7F
&00 Length of sent control block
&01 Length of received control block
&02... Any other parameters

OSWORD &00 is the only call that is allowed to return data in registers. All other calls return data in the control block.

OSWORD calls with numbers greater than &7F should contain the number of parameters to send in the first byte of the parameter block, and the number of parameters to receive in the second byte of the parameter block, inclusive of the first two bytes.

OSWORD calls with numbers &E0 to &FF are "available for use by the user".[1] They are indirected via USERV on the 6502 I/O processor.[1][2]

Calling from BBC BASIC

Entry points

  • BBC BASIC Entry Address: &FFF1
  • 6502 Entry Address: &FFF1, vectors via &020C
  • Z80 Entry Address: &FFF1, vectors via &FFF2
  • 6809 Entry Address: &FFF1, vectors via &FFF2
  • 80x86 Entry Address: INT &4A, vectors via &0000:0128
  • 32000 Entry Address: SVC &07
  • PDP-11 Entry Address: EMT 3, vector &03
  • ARM Entry Address: SWI &07 "OS_Word", vector &07

See Also

References

  1. 1.0 1.1 R.I.M. Sadek (1986), The complete disc manual for the BBC Microcomputer, Macmillan Education Ltd. p.107.
  2. Acorn Computers (June 1992), Application note 004: Tube application note, p.5.

Jgharston 17:03, 6 November 2009 (UTC)