OSWRCR

From BeebWiki
Jump to: navigation, search

An unofficial entry point to the MOS that sends a carriage return to the current output stream(s).

Contents

Specification

 6502   Z80   6809   PDP11   80x86   32016   ARM  On entry: On exit:
A A A R0 AL R1 R0   = &0D

Prints an ASCII carriage return (CR) via OSWRCH to the currently selected output stream(s). This is an undocumented system call and is platform dependent.

Compare with OSNEWL, an official call to print a newline sequence.

Calling from BBC BASIC

  • BASIC does not call OSWRCR

Entry points

  • BBC BASIC Entry Address: none
  • 6502 Entry Address: &FFEC
  • Z80 Entry Address: &FFEC
  • 6809 Entry Address: &FFEC
  • 80x86 Entry Address: &FFEC from BBC BASIC
  • 32000 Entry Address: none
  • PDP-11 Entry Address: none
  • ARM Entry Address: SWI &10D "OS_WriteI"+13

Implementations

Although undocumented, the code at the entry point exists in the 6502 and Z80 MOS and the 80x86 BASIC runtime due to the way the entry code is written. BBC BASIC on other platforms do not emulate this entry point.

-- beardo 00:53, 14 June 2007 (BST)