Using | Master Select Codes |
Most versions of BASIC use the LPRINT command and the CHR$(n) function to send codes to the printer. In the CHR$(n) function the value n is the number of the code that you want to send to the printer. For example, to set a right margin at column 60, the
<ESC> “Q” 60
In BASIC it looks like this: LPRINT CHR$(27) “Q” CHR$(60);
Control Codes by FunctionVertical Spacing Commands<LF> | produces a line feed. |
<ESC> ”J” n | Advances the paper n/180 inch |
<ESC> “0” | Sets the line spacing to *1/8 inch. |
<ESC> “2” | Sets the line spacing to l/6 inch. |
<ESC> “3” n | Sets the line spacing to l/180 inch (0 n 255). |
<ESC> “A” n | Sets the line spacing to n/60 inches (0 n 85). |
<FF> | Produces a form feed. |
<ESC> “C” n | Sets the length of the page to n lines |
<ESC> “C” <NUL> n Sets the page length to n inches | |
<ESC> “N“ n | Sets a bottom margin of n lines |
<ESC> “O” | Sets the bottom margin to 0 lines. |
<VT> | Produces a vertical tab. |
<ESC> “B” n1 n2 n3 ___ <NUL> | |
| Sets up to 16 vertical tabs on lines n1, n2, n3, etc. |
<ESC> “/” c | Selects a vertical tab channel |
<ESC> “b” c n1 n2 n3 ... <NUL>
Sets up to 16 vertical tabs on lines n1, n2, n3, etc. of vertical tab channel c
Horizontal Spacing Commands<CR> | Produces a carriage return. |
<ESC> “Q” n | Sets a right margin at n columns |
<ESC> “1” n | Sets the left margin at n columns |
<HT> | Produces a horizontal tab. |
<ESC> “D”n1 n2 n3... <NUL> | |
| Sets up to 32 horizontal tabs at character positions n1, |
<ESC> <SP> n | n2, n3, etc. |
Increases the space between characters by n dots | |
<ESC> “$” n1 n2 | Moves the print head to an absolute horizontal position. |
<ESC> “\” n1 n2 | Moves the print head a specified distance from the last |
| character printed. |
<ESC> “x” n | Selects between draft mode (n=0) and letter quality mode. |
<ESC> “!” n | Selects multiple printing styles (Master Select command). |
<ESC> “M” | Selects elite pitch. |
<ESC> “P” | Cancels elite pitch. |
<ESC> “p” n | Turns proportional printing ON (n=1) or proportional |
| printing OFF (n=0). |
< s o > | Selects |
<ESC> <SO> | Selects |
<DC4> |
| Cancels |
<ESC> “W” n | Turns expanded width print ON (n=1) or turns | |
|
| expanded width print OFF (n=0). |
<SI> |
| Selects compressed width print. |
<ESC> | <SI> | Selects compressed width print. |
<DC2> |
| Cancels compressed width print. |
<ESC> | “E” | Selects emphasized print. |
<ESC> | “F” | Cancels emphasized print. |
<ESC> | “4” | Selects italic print. |
<ESC> | “5” | Cancels italic print. |
<ESC> | Turns underlining ON (n=1) or turns underlining | |
|
| OFF (n=0). |
<ESC> “S” n | Selects superscripts (n=0) or selects subscripts (n=l). | |
<ESC> | “T” | Cancels superscripts and subscripts. |
Character Set Commands | ||
<ESC> “%” n | Selects the | |
|
| the |
<ESC> “&” <NUL> n1 n2 data | ||
|
| Defines |
<ESC> “.” <NUL> <NUL> <NUL> | ||
|
| Copies ROM character set to |
<ESC> “R” n | Selects international character set |
<ESC> “K” n1 n2 data | Prints | |
<ESC> “L” n1 | n2 data | Prints |
<ESC> “Y” n1 | n2 data | Prints |
<ESC> “Z“ n1 n2 data | Prints | |
<ESC> “*” s n1 n2 data | prints | |
<ESC> “?” s n |
| Assigns graphics densities. |
<CAN> | Cancels the current line. |
<DEL> | Deletes the preceding character. |
<DC3> | Turns printer to |
<DC1> | Turns printer to |
<ESC> “V” n data <ESC> “V” <NUL>
Repeats data, n times Sets the eighth data bit to 1.
Sets the eighth data bit to 0.
Cancels control of the eighth data bit. Sounds the buzzer.
Produces a backspace. Resets the printer.
Causes the next line to be printed
Each print style is assigned a value to be used with the Master Select com- mand. The Master Select command consists of <ESC> ’!” followed by a single ASCII code. To create a Master Select code, add the values of the print styles you want to combine.
The values of the print styles are as follows:
Elite | 1 |
Proportional | 2 |
Compressed | 4 |
Emphasized | 8 |
Expanded | 32 |
Italic | 64 |
Underlined | 128 |
For example, if you want to find the code for elite emphasized italic print you would add these values:
Elite Emphasized Italic
Master Select code
The Master Select Command you would use would look like this:
<ESC> “!” “I”(I is ASCII 73)
DIP Switch SettingsInterface DIP switch Panel 1
|
| Switch |
|
| Function |
| ON (up) |
|
| OFF (down) | Factory setting | ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
| Disabled | Enabled | OFF | ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Not used |
| - |
| - |
| OFF | ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Automatic line |
| LF added |
| LF needed | OFF | |||||||
|
|
|
| feed |
| by printer |
| from computer |
| ||||||
|
|
| Control ROM |
|
| See Appendix D | OFF | ||||||||
|
|
|
| selection |
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Interface DIP switch Panel 2 |
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|
|
|
|
|
| |||
|
| Switch |
|
| Function |
| ON (up) |
| OFF (down) | Factory setting | |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| International character | selection |
| ON | |||||||||
|
|
|
| ON | |||||||||||
|
|
|
|
| (See Table |
|
|
| |||||||
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
| ON | |||
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
| Form length | 12" |
|
| 11” | OFF | ||||||
|
|
| 1" |
| Enabled |
| Disabled | OFF | |||||||
|
|
|
|
|
| perforation |
|
|
|
| I |
| |||
|
|
| Buzzer |
| Disabled |
| Enabled | OFF | |||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
| Print quality |
| LQ* |
|
| Draft** | OFF | ||||||
|
|
|
| signal Fixed |
| Not fixed | ON | ||||||||
|
| SLCT IN |
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*Letter quality ** Draft quality