MANUAL FOR PRETTYPRINT (6502 ROM image) This file describes the ROM image PRETTYPRINT which adds 'OS_PrettyPrint' support to the BBC in an identical manner to that supplied on RISC OS based machines. The manual is (C)1998 SPROW and software is (C)1997 SPROW INSTRUCTIONS- At any command line prompt, eg.the BASIC command prompt '>' type ON A MASTER: *SRLOAD HELPTXT 8000 *INSERT where may be 7, 6, 5, 4 ON A MACHINE WITH SWRAM: *LOAD HELPTXT 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+00 4 byte pointer to null terminated string to print (low byte first) XY+04 4 byte pointer to user dictionary, or 0 to use built in dictionary (low byte first) XY+08 4 byte pointer to null terminated 'special string' (low byte first) XY+12 Source of string to print, 00=RAM 128+socket=ROM XY+13 Source of user dictionary, 00=RAM 128+socket=ROM if XY+04 is non zero XY+14 Source of 'special string', 00=RAM 128+socket=ROM COMMAND LINE- *HELP "filename" Where "filename" contains a valid block of pretty print text starting with a 15 byte block as though it had been entered as an OSWord. Note that the OSWord block needs addresses putting in it, a SENSIBLE load address will need to be specified in the file's catalogue entry. EXIT MESSAGES- Missing " - the command line had mismatched quotes Dictionary entry not found - an escape sequence number was out of range Load address too low - the file specified on the command line loaded in at a dangerous 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 WHAT PRETTY PRINT IS- Pretty print writes a string pointed to by an OSWord control block, in addition there are some special properties that it looks out for though: * A carriage return causes a newline to be generated * TAB causes a tabulation to the next multiple of eight chars * Wordwraps, unless the words are separated by CHR$31 (used as a hard space) * ESC (ASCII 27) indicates that a dictionary entry should be substituted To use a dictionary entry, place a CHR$27 followed by an entry number to look up in the range 1-255 (the entry '0' is used to look up the 'special string' pointed to by XY+8). There is a default dictionary, which doesn't contain all 255 entries, but you may of course specify your own 'User dictionary' if the application you have in mind uses alot of the same strings. eg.a chemistry related program. Effectively this will result in text being compacted since whole words are replaced by just two bytes. KNOWN PROBLEMS/FUTURE ENHANCEMENTS- No known problems HISTORY- V0.90 First release version, to the EUG disk user group along with an article on word wrapping text V1.00 Wordwrapping to current text window width implemented DICTIONARY FORMAT- Dictionary entries may recursively refer to other dictionary entries, nested no deeper than 32 levels (otherwise the stack overflows).The first byte of the entry points to the next entry, then there's text terminated by a 0 byte. So for a file of N strings: <1STstring$of255chr$orless><00> <2NDstring$of255chr$orless><00> : : : : : : <(N-1)THstring$of255chr$orless><00> <00><00> DEFAULT DICTIONARY- 00=> 01=>"Syntax: *"+ 02=>" the " 03=>"director" 04=>"filing system" 05=>"current" 06=>" to a variable. Other types of values can be assigned with *" 07=>"file" 08=>"default " 09=>"tion" 10=>"*Configure " 11=>"name" 12=>" server" 13=>"number" 14=>"Syntax: *"++" <" 15=>" one or more files that match the given wildcard" 16=>" and " 17=>"relocatable module" 18=>CR+"C(onfirm)"+TAB+"Prompt for confirmation of each" 19=>"sets the" 20=>Syntax: *"++" []" 21=>")"+CR+"V(erbose)"+TAB+"Print information on each file " 22=>"spriteLandscape [ [ [ []]]]]" 23=>" is used to print a hard copy of the screen on EPSON-" 24=>"."+CR+"Options: (use ~ to force off, eg. ~" 25=>"printe" 26=>"Syntax: *"++" " 27=>"select" 28=>"xpression" 29=>Syntax: *"++" [" 30=>"sprite" 31=>" displays" 32=>"free space" 33=>" {off}" 34=>"library" 35=>"parameter" 36=>"object" 37=>" all " 38=>"disc" 39=>" to " 40=>" is "