RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

OS_WriteC

Programmer's Reference Manuals
» Part 15 – SWI Calls
» OS
» OS_WriteC

OS_WriteC

(SWI &00)
Entry
R0 Character to write
Exit
R0 Preserved

Use

The purpose of this call is to send a character to all of the active output streams.

Notes

This SWI sends the byte in R0 to all active output streams (see OS_Byte 3 for specifying a stream). Do not assume that this SWI will never generate an error – it can and occasionally does.

Consider the case where output is redirected to a file on a filing system which has no space. This is the most common example.

A less common, but possible case is where an application displays a string in its Exit handler. Under a TaskWindow, if you close the window before the task has exited, its Exit handler is called. This should tidy up and exit. If it prints strings using non-X versions of the SWIs an error will be generated. This will call the Error handler, which will either display a message or call the Exit handler. In the former case, if X SWIs are used the Exit handler is usually called.

The outcome of this is that a TaskWindow can hog 99% of the processor time as it switches in and out of SVC mode incredibly quickly in an infinite sequence of errors. Avoid this by using X SWIs.

See also

  • OS_Byte 3
  • OS_Write0
  • OS_WriteI
  • OS_WriteN
  • OS_WriteS
  • TaskWindow
Created on December 4, 2009 23:41:48 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: FileSwitch Miscellaneous Information, OS SWI Calls, VDUXV, Software Vector Numbers, OS_Byte 199, OS_Write0, OS_WriteI, OS_WriteN, OS_WriteS, *Spool, *SpoolOn, SWI Introduction, WrchV, BASICTrans_HELP, BASICTrans_Message

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys