WITHBASIC

Asan exampleofprogrammingtheprinter on,~crosoft BASIC,we have

listed the programfor the IBM-PC. This programruns in the printer’s

Standardmode,andthe dowrdoadablecondition.

1000 Set control codes
1010 E3=CHR$ (27) Escape cnde
1020 O$=E$+’’XO” Draft qual ity
1030 N*E5+”X1“ Near letter qual ity
1040 F$=E$+”k ‘Select font
1050 C$=F5+CHR5 (2)+N$ ‘Select Courier
1060 HS=CHR5 (9) ‘Horizontal tab
1070 P$=E$+”P” ‘Pica pitch
1080 Start printin~
1090 UIDTH “LPTl:’’,2~5
1100 LPRINT
1110 LPRINT
1120 LPRINT
1130 LPRINT
1140 LPRINT
1150 LPRINT
1160 LPRINT
1170 LPRINT
1180 LPRINT
1190 LPRINT
1200 LPRINT
1210 LPRINT
1220 LPRINT
1230 LPRINT
1240 LPRINT
E5:’’O’’ ;CHR$(3):CHR$(27) :CHR$(0) ‘Set HT
CS:’’Resident fonts are:”
H$:DS:’’Draft characters,’’:N$:
H5:F$;CHR$(1) :“ Sanserif characters,”:
H5:F$;CHR5(2) :“ Courier characters.”
H$;FS:CHR$(4) :“ Script characters,”:
H$:F$;CHR$(7):” Orator characters,”
C3:’’Print pitchee are:”
H$:P5:’’Pica pitch (10 CPI),”:
H$:E$:’’M”:” Elite pitch (12 CPI).”
H$:P5:
CHR$(15): ‘Select condensed print
“Condensed pica pitch (17 CPI),”:
H$:E5:’’M”:” Condensed elite ~itch (20 CPI).”:
1250 LPRINT
1260 LPRINT
1270 LPRINT
1280 LPRINT
1290 LPRINT
1300 LPRINT
1310 LPRINT
1320 LPRINT
1330 LPRINT
1340 LPRINT
1350 LPRINT
1360 LPRINT
1370 LPRINT
1380 LPRINT
1390 LPRINT
1400 FOR 1=1
141O LPRINT E$i’’A’’:CHR5(I) ;‘Line spacing set
1420 LPRINT E$:” “:CHR$(I): ‘Increase character space
1430 LPRINT “THE SPOCINGS ARE CHANGED”
1440 NEXT I
14S0 FOR 1=7 TO 1STEP -1
1460 LPRINT E.$:’’A’’:CHR5(I) :‘Line spacing set
1470 LPRINT E$:” “:CHR$(I): “Increaae character epacs
1480 LPRINT “THE SP!3CINGS ARE CHANGED”
CHRS(18) ‘Cancel

H$:E$:’’pl”: ‘Select

P$:’’Pr0p0rti0nal spacing.”:

E$:’’pO” ‘Cancel

H$:E$:’’w1”:M DOuble-height, ’’:E5: “wO”
H$:E$:’’I.J1”: “Double width, “:E$:”UO”
H$:E$:’’h’’ :CH9(1)l) :“Double-sized,”
H$:E$:’’h’’ :CHR5(2) :“Qua.d-.eized.”:
E$:’’h”:CHR5(O)
:LPRINT
condsnsad print
proportional spacing
proportional apacing
E$:’’Q’’;CHR$(47) ‘Set right margin
C5:’’Varinue line and character apacinge:m
E$:’’al” ‘Center text
1TO 7
1490 NEXT I
1500 LPRINT E$:’’aO” ‘Left juetify
1510 LPRINT E$:’’3’’:CHR$(36) :‘Set 1/6” line spacing
1520 LPRINT E$:” “;CHR$(0): ‘Narmal character apace
1530 LPRINT CHR$(27) :’’Q’’:CHR$(8O)
1540 LPRINT
1550 LPRINT C$:’’Other features:”
1560 LPRINT H5:E$:”E”:’’Emphaeized” :E$:’’F’’:”, “:
1570 LPRINT E$:’’G’’ OOublebstrike”ke” :E$:’’H’’:”, “:
1580 LPRINT E$:’’4’’ :mItalic:E$:”5°”5° :“,
1590 LPRINT H5:ES; ’’-:’’ :’’Underlining” :E$:’’-:”,:”, “:
1600 LPRINT E$:’’SO’’ :”SUPERSCRIP:ES :ES: “T”:” and “:

123