Prettyprint ROM

By Robert Sprowson

Originally published in EUG #40

This file describes a ROM image which adds "OS_PrettyPrint" support to the BBC in an identical manner to that supplied on RISC OS-based machines. For more information read the article entitled 'What It Is'.


At any command line prompt, eg. the BASIC command prompt >, type:

  On a Master 128: *SRLOAD U.DRDIR 8000 (socket#)
*INSERT (socket#)
where socket# may be 7, 6, 5, 4
On a Machine with SRAM:*LOAD U.DRDIR 8000
and press CTRL-BREAK to initialise.

The image will then be installed into the chosen socket where it will wait for the user to issue one of the following two stimuli:

Osword Call

A=&47 and X & Y point to a control block in memory

XY+004 byte pointer to null terminated string to print (low byte first)
XY+044 byte pointer to user dictionary,or 0 to use built in dictionary (low byte first)
XY+084 byte pointer to null terminated 'special string' (low byte first)
XY+12Source of string to print, 00=RAM 128+socket=ROM
XY+13Source of user dictionary, 00=RAM 128+socket=ROM if XY+04 is non zero
XY+14Source of 'special string', 00=RAM 128+socket=ROM

Command Line

*HELP "fname" where "fname" contains a valid wadge of text and starts with a 15 byte block as though it had been entered as an OSWord.

To make a file that is suitable for use in this manner is really easy. You just take your prettyprint text and then put the 15 byte OSWord block at the beginning of the file. Because the OSWord block needs addresses putting in it, you'll need to specify a sensible load address in the file's catalogue entry.

Exit Messages

Missing " Command line missing a closing ditto
Dictionary entry not found Escape sequence number was out of range
Load address too low The file specified on the command line loaded in at a silly place in the memory map
File not found The file specified on the command line doesn't exist
Tube hardware not found The OSWord block specified data to come from the Tube

Known Problems/Future Enhancements

No known problems.


v0.90 First release version to the EUG User group along with an article on word wrapping text
v1.00 Wordwrapping to current text window width implemented