Forgreater convenience you can make abatch file that will setup the printer and print any

specifiedfilewitha singlecommzmd.Tocreatesuchabatchfile withthename SJPRINT.BAT,

type in the first four lines shown next. AZ mems to press the CTRL and Zkeys

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 acopy command from the CONsole screen to afile named

SJPRINT.BAT. The next two lines are the contents of this file. The %1 is adummy

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 print inz
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$;“W1;Double–he ight,“;E$;“WO”
H$;E$;“W1“;’’Double width, “;E$;’’WO”
H$;CHR$(28) ;’’E’’;CHR$(2) ;“Triple width, “;
CHR$(28);tiEM;CHR$(0)
H$;E$;Mh“;CHR$(l);” Double–sized,ti
E$;’’h’’;CHR$(O)
E$;’’Q’’;CHR$(47) ‘Set right margin

Chapter8 MS-DOS ANDYOURPRINTER 79