Star Micronics NX-2415II Printer User Manual


 
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 downloadable
condition.
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
1100
1110
1120
1130
1140
1150
1160
1170
1180
1190
1200
1210
1220
1230
1240
1250
1260
1270
1280
1290
1300
1310
1320
1330
1340
1350
1360
1370
1380
1390
1400
1410
1420
1430
1440
1450
1460
1470
1480
1490
Set c c
E$=CHR$( 27 )
E c
D$=E$+’’xO”
Draft quality
L$=E$+”X1“+E$+ “k”
‘Letter quality
RM$=L$+CHR$(O) ‘Roman character
H$=CHR$(9)
‘Horizontal tab
PI$=E$+”P”
‘Pica pitch
Start printing
WIDTH “LPT1:’’.255
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
LPRINT
LPRINT
LPRINT
E ; ‘Set HT
RM$;’’Resident fonts are:”
H$;D$;’’Draft characters,”;
H$;L$;CHR$(0) ;“Roman characters,”
H$;L$;CHR$(l) ;“Sanserif characters,”
H$;L$;CHR$(2) ;“Courier characters,”
H$;L$;CHR$(3); “Prestige characters,”
H$;L$;cHR$(4) ;“Script characters.”
RM$;’’Print pitches are:”
F?$;PI$;’’Pica pitch (10 CPI),”;
H$;E$; ’’M’’Eliteite pitch (12 CPI),”
H$; E$; ’’g’’ Semiecondensedsed pitch (15 CPI),”
H$;PI$;
CHR$(15);
‘Select condensed print
“Condensed pica pitch (17 CPI),”
H$; E$; ’’M’’Condensedsed elite pitch (20 CPI),”;
CHR$(18)
‘Cancel condensed print
H$;E$;’’P1”;
‘Select proportional spacing
PI$;UNormal proportional,”
H$; CHR$(15) ;’’Condensed proportional,” ;
CHR$(18);
E$;’’PO” ‘Cancel proportional spacing
H$; E$; ’’wl’’D oublebheightght ,“; E$;’’wO”
H$;E$; ’’Wl’’Douhlehle width, “;E$;’’WO”
H$;CHR$( 28) ;’’E’’;CHR$(2) ;“Triple width.”;
CHR$(28) ;’’E’’;CHR$(O)
RM$;’’Various line and character spacings:”
FOR 1=1 TO 7
LPRINT E$;’’A’’;CHR$(I);
‘Line spacing set
LPRINT E$;n “;CHR$(I);
‘Increase character space
LPRINT H$;’’THE SPACINGS ARE CHANGEDU
NEXT 1
FOR 1=’7 TO 1 STEP -1
LPRINT E$;’’A’’;CHR$(I);
‘Line spacing set
LPRINT E$;” “;CHR$(I);
‘Increase character space
LPRINT H$;’’THE SPACINGS ARE CHANGED”
NEXT I
LPRINT E$;’’3’’;CHR$(3O) ;
‘Set 1/6” line spacing