You will note that this program avoids the printer’s double-parenthesis commands. To change colours, for example, it uses the escape sequence E$: “r”; CHR$(n), where E$ is predefined as CHR$(27), instead of the equivalent command ((C))n. The double-parenthesis commands are great for embedding in documents, but they are less convenient in programs. In their simplest form they cannot be listed; instead of listing them, the printer executes them.

1000

’ Set

control

codes

‘Escape

 

code

 

 

 

1010

E$-CHR$(27)

 

 

 

 

 

 

 

1020

D$-E$+“xO”

 

 

 

‘Draft

quality

 

 

1030

N$-E$t”xl”

 

 

 

‘Near

letter

quality

 

1040

C$-E$t”kO”+N$

 

 

 

‘Courier

 

 

 

 

 

1050

S$-E$t”kl”tN$

 

 

 

‘Sanserif

 

 

 

 

1060

Ol$-E$+“k2”+N$

 

 

 

‘Orator

 

with

small

capitals

1070

028sE$+“k3”+N$

 

 

 

‘Orator

 

with

lower

case

 

1080

H$KHR$(B)

 

 

 

‘Horizontal

 

tab

 

 

1090

P$-E$+“P”

 

 

 

‘Pica

pitch

 

 

 

1100

’ Start

printing

 

 

 

 

 

 

 

 

 

 

1110

WIDTH “LPTl *” ,255

 

 

 

 

 

 

 

 

1120

LPRINT

E$;“D”;CHR$(3);CHR$(20);CHR$(O)

‘Set

HT

1130

LPRINT

C$; “Type

styles

are

: ”

 

 

 

 

1140

LPRINT

H$ ; D$ ; “Draft

characters,

 

 

 

1150

LPRINT

H$; C$; “Courier

 

characters,

 

 

1160

LPRINT

H$; S$ ; “Sanseri

f

characters,

 

 

1170

LPRINT

H$;Ol$;“Orator

 

with

small

capitals,

or H

1180

LPRINT

H$;02$; ”

 

 

with

lower

case

characters,”

1190

LPRINT

E$ ; “4” ;

 

 

 

‘Select

 

italics

 

 

1200

LPRINT

H$;02$;“and

 

“;Ol$;“italics

 

“;S$;“for

“;

1210

LPRINT

C$;“all

 

“;D$;“styles.”

 

 

 

 

 

1220

LPRINT

E$ ; “5”

 

 

 

‘Cancel

 

italics

 

 

1230

LPRINT

C$; “Print

 

pitches

are

: ”

 

 

 

1240

LPRINT

H$;P$;“Pica

 

 

pitch,“;

 

 

 

 

 

1250

LPRINT

H$;E$; “M”;

“Elite

pitch,

 

 

 

1260

LPRINT

H$;CHR$(15);

 

‘Condensed

pitch

 

 

1270

LPRINT

P$; “Condensed

pica

pitch,

‘I;

 

 

1280

LPRINT

H$ ; E$ ; “M” ; “Condensed elite

pitch,“;

 

1290

LPRINT

P$;

 

 

 

‘Pica

pitch

 

 

 

1300

LPRINT

CHR$( 18)

 

 

‘Cancel

 

condensed

print

 

1310

LPRINT

H$;E$; “~1”;

 

‘Select

 

proportional

spacing

1320

LPRINT

“Proportional

 

spacing

for

all

pitches,”

 

1330

LPRINT

E$ ; “~0”

 

 

 

‘Cancel

 

proportional

spacing

1340

LPRINT

H$ ; E$ ; “Wl ” ; “Expanded,

” ; E$ ; “WO” ;

 

1350

LPRINT

E$ ; “~1”

; “Doub 1e-height

,

” ; E$ ; “~0 ”

 

1360

LPRINT H$;E$;“h”;CHR$(l);“Double-sized,”

 

 

 

1370

LPRINT H$;E$;“h”;CHR$(2);“Quad-sized.“;

 

 

 

1380

LPRIN’T E$ ; “h” ; CHR$(0 )

 

 

 

 

 

 

1390

LPRINT

:LPRINT

 

:LPRINT

 

 

 

 

 

 

1400

LPRINT

C$; “Colour

printing:”

 

 

 

 

 

41

Page 48
Image 48
Star Micronics lC-10 user manual For