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_PrettyPrint

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

OS_PrettyPrint

(SWI &44)
Entry
R0 Pointer to null terminated string to write
R1 Pointer to dictionary (0 = RISC OS dictionary)
R2 Pointer to null terminated special string
Exit
R0 Preserved
R1 Preserved
R2 Preserved

Use

The purpose of this call is to write an indirect string, with formatting, to all of the active output streams.

Notes

Compacted text uses an escape character in the print string to indicate a dictionary entry. It is followed immediately by a byte which is the dictionary entry number. If this byte is in the range 1-255, then the appropriate string in the dictionary is substituted. If its 0, then the special string pointed to by R2 is substituted. (This is used in particular by the *Help command.)

The format of a dictionary is a linear list of entries, which can recursively refer to other dictionary entries; each entry is a length byte followed by a 0 terminated string. This means that a dictionary doesn’t have to have 255 entries – it can be ended at a point with a zero length entry.

This call acts like OS_Write0 with several differences:

  • It will break a line at a space if the next word will not fit on the line, except at hard spaces
  • Compacted text is handled
  • CR causes a newline to be generated
  • TAB causes tabulation to the next multiple of eight columns
  • ASCII 31 is a hard space
  • ESC (ASCII 27) indicates that a dictionary entry should be substituted

See also

  • OS_Write0
  • RISC OS Default Dictionary
  • *Help
Revised on November 26, 2010 12:55:20 by Trevor Johnson (329)? (127.0.0.1)
Edit | Back in time (1 revision) | See changes | History | Views: Print | Source | Linked from: OS SWI Calls, RISC OS Default Dictionary, WrchV

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