A SERVICE OF

logo

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 IBM-PC. This program runs in the printer’s Standard mode, and the
downloadable condition.
1000
1010
1
1
1
1
1
1
1
1
1
1
1
1130
1140
1150
1160
1170
1180
1190
1200
1210
1220
1230
1240
1250
1260
1270
1
1
1300
1310
1320
1330
1340
Set control codes
E$=CHR$ (27)
‘Escape code
TM$=E$+”k“+CHR$ (O)
‘Roman character
H$=CHR$ (9)
‘Horizontal tab
PI$=E$+“P“
‘Pica pitch
EL$=E$+”M“
‘Elite pitch
Start printinz
WIDTH “L~Tl:“,2;5
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
LPRINT
E$ ;“D“;CHR$ (3);CHR$(30);CHR$(O)
‘Set HT
TM$ ;“Resident fonts are :“
H$ ;E$ ;“
k“;CHR$(O);“Roman characters ,“;
H$;E$ ;“k
“;CHR$ (12);“H-Gothic characters .“
TM$ ;“Print pitches are :“
H$ ;PI$;“Pica pitch (10 CPI ),“;
H$ ;EL$ ;“
Elite pitch (12 CPI ),“
H$ ;E$ ;“g“;“
Semi–condensed pitch (15 CPI ),“;
H$ ;PI$;
CHR$(15);
‘Select condensed print
“Condensed pica pitch (17 CPI ),”
H$ ;EL$ ;“
Condensed elite pitch (20 CPI ),”;
CHR$ (18)
‘Cancel condensed print
H$ ;E$ ;“P1“;
‘Select proportional spacing
PI$;’’Normalproportional,”;
H$ ;CHR$ (15);“Condensed proportional.”;
CHR$(18):
E$ ;!!PO!!
‘Cancel proportional spacing
H$ ;E$ ;“
W 1 ; Double–height ,“;E$ ;“WO”
H$;E$ ;“W1“;’’Double width, “;E$;’’WO”
H$;CHR$(28) ;’’E’’;CHR$(2) ;“Triple width,“;
CHR$(28); tiEM;CHR$(0)
H$;E$;M
h“;CHR$(l);”
Double–sized,ti
E$;’’h’’;CHR$(O)
E$;’’Q’’;CHR$(47)
‘Set right margin
Chapter8 MS-DOS ANDYOURPRINTER 79