
For greater convenience you can make a batch file that will setup the printer and print any specifiedfilewitha singlecommzmd.To createsuchabatchfile withthename SJPRINT.BAT, type in the first four lines shown next. AZ mems to press the CTRL and Z keys simultaneously. To use this file to print README.DOC, type the fifth line.
A>COPY CON SJPRINT . BAT COPY SJELITE. DAT PRN PRINT %1
‘z
A>SJPRINT README. DOC
The first line above is a copy command from the CONsole screen to a file named SJPRINT.BAT. The next two lines are the contents of this file. The %1 is a dummy parameter: whatever file name you type after SJPRINT will be substituted for %1 and printed.
PROGRAMMING WITH BASIC
As an example of programming the printer on Microsoft BASIC, we have listed the program for the
1000 ‘ Set control codes | ‘Escape | code | |
1010 E$=CHR$ (27) | |||
1 | TM$=E$+”k“+CHR$ (O) | ‘Roman | character |
1 | H$=CHR$ (9) | ‘Horizontal tab | |
1 | PI$=E$+“P“ | ‘Pica pitch | |
1 | EL$=E$+”M“ | ‘Elite pitch |
1‘ Start print inz
1WIDTH “L~Tl:“,2;5
1 | LPRINT E$ ;“D“ ;CHR$ (3);CHR$ (30);CHR$ (O) | ‘Set HT |
1LPRINT TM$ ;“Resident fonts are :“
1LPRINT H$ ;E$ ;“k“;CHR$ (O);“Roman characters ,“;
1LPRINT H$ ;E$ ;“k“;CHR$
1LPRINT
1130 LPRINT TM$ ;“Print pitches are :“
1140 LPRINT H$ ;PI$ ;“Pica pitch (10 CPI ),“; 1150 LPRINT H$ ;EL$ ;“Elite pitch (12 CPI ),“
1160 LPRINT H$ ;E$
1180 | LPRINT | CHR$ (15); | ‘Select condensed | ||
1190 | LPRINT | “Condensed pica pitch | (17 CPI ),” |
|
|
1200 | LPRINT H$ ;EL$ ;“Condensed elite pitch (20 CPI ),”; |
|
| ||
1210 | LPRINT CHR$ (18) | ‘Cancel condensed | |||
1220 | LPRINT | H$ ;E$ ;“P1“; | ‘Select proportional | spacing | |
1230 | LPRINT | PI$;’’Normalproportional,”; |
|
| |
1240 | LPRINT H$ ;CHR$ (15);“Condensed | proportional.”; |
|
| |
1250 | LPRINT CHR$ (18): |
|
|
| |
1260 | LPRINT E$ ;!!PO!! | ‘Cancel proportional | spacing | ||
1270 | LPRINT |
|
|
|
|
1LPRINT H$ ;E$ ;“W 1 “ ; “
1LPRINT H$ ;E$ ;“W1“;’’Double width, “;E$;’’WO”
1300 LPRINT H$;CHR$(28) ;’’E’’;CHR$(2) ;“Triple width,“; 1310 LPRINT CHR$(28); tiEM;CHR$(0)
1320 LPRINT H$;E$;Mh“;CHR$(l);”
1340 LPRINT E$;’’Q’’;CHR$(47) | ‘Set right margin |