This page describes the control characters and escape sequences recognized by the printer. You should add these sequences to an assembler common (.ACM) deck, or use the ASCII.ACM file supplied on the extras disk.
For information on how to use the LP: driver to print, see the Printing page.
Important Note: In order to use the printer escape sequences documented below, you must upgrade to v1.1 of the LP: driver. The correct lp.dvd file is included on the extras and boot/sysgen disks distributed with the emulator.
|Page Index||Control Characters|
The printer responds to the following control characters. See Escape Sequences for the list of special features supported and how to use them.
|NL||carriage return/line feed - move down one line and to the left margin|
|FF||form feed - finish this page and skip to the top of the next page|
|HT||horizontal tab - move to the next tab stop (tab stops fixed at 8 column intervals, same as the H-19)|
|ESC||escape - starts an escape sequence|
All other non-printing characters are filtered out by the emulator.
Special print features are controlled by sending escape sequences to the printer.
Note: Numbers as parameters to the Size or Color commands can be expressed in either decimal or octal, and spaces are ignored. This should make it convenient to use these features in both Basic and Assembler programs.
No leading zeros. Example: 27 = decimal 27.
Must have at least one leading zero to signal the emulator that it's octal. Example: 033 = decimal 27.
Note: In the table below, "esc" refers to the escape character:
ESC EQU 033Q
00010 e$=CHR$(27) : REM e$ contains the escape character
|esc B||PE.BOLD||start bold face type|
|esc b||PX.BOLD||end bold face type|
|esc I||PE.ITAL||start italic type (upper-case "eye")|
|esc i||PX.ITAL||end italic type|
|esc U||PE.UNDR||start underlined type|
|esc u||PX.UNDR||end underlined type|
|esc F||HEGM||enter graphics mode
The current font is saved, and the active font is changed to Heath. The font cannot be changed to anything else until the esc G sequence ends graphics mode.
|esc G||HXGM||exit graphics mode
The font that was in use when esc F enabled graphics mode is restored.
|esc f||P.FONT||change font
esc f<font name>;
If the font name is too long (30 characters, max), the sequence is ignored. If the trailing semicolon is missing, characters will be "eaten" from the output until 30 characters have been removed or the next NL character is encountered.
|esc s||P.SIZE||change font size
Size must be expressed as a decimal or octal number (a leading zero indicates octal) expressed in printable ASCII characters. Spaces between the 's' and ';' are ignored. If the emulator encounters any other non-numeric character or NL before encountering the semicolon, the command is ignored.
esc s 12 ; - change to 12-point type; size expressed in decimal, spaces are ignored
esc s014; - change to 12-point type; size expressed in octal
|esc c||P.COLOR||change font color
esc c<% red,% green,%blue>;
Percentages must be between 0 and 100, expressed as a decimal or octal number (a leading zero indicates octal) in printable ASCII characters. Spaces between the 'c' and ';' are ignored. If any other illegal character or an illegal number is encountered, the command is ignored.
To select a precise font color, use the Macintosh RGB color picker to find the color then copy the color percentages into your H8 program.
esc c 25 , 50 , 85 ; - decimal expression; spaces ignored
esc c0031, 0062, 0125; - same color expressed in octal; spaces ignored
Note that esc c 0, 0, 0; will set the color to black; this is the default color. Esc c 100, 100, 100; is white and will generally not print. Esc c 50,50,50; is medium gray.
|esc r||P.RESET||reset printer to default values|
Note that bold, italic, and underline can be used in combination.
If any other escape sequence is encountered, it is ignored and printing resumes immediately following the bad two-character escape sequence.
The default printer configuration is:
Defaults are set when a new print job is started, and when the printer is reset.