Star Micronics LC24-200 user manual Programming with Basic, 1110

Models: LC24-200

1 170
Download 170 pages 11.85 Kb
Page 112
Image 112

PROGRAMMING WITH BASIC

As an exampleofprogrammingtheprinteron MicrosoftBASIC, we have

listedtheprogramfortheIBM-PC. Thisprogramrunsintheprinter’s

Standardmode,andthe downloadablecondition(EDSswitchA-1 ON and A-2 OFF).

1000 ‘ Set contro 1 codes

 

 

 

 

 

‘ Escape

code

 

 

1010 E$=CHR$( 27)

 

 

 

 

 

 

 

 

 

 

1020 D$=E$+” XO“

 

 

 

 

 

 

 

 

‘Draft

qual

i ty

 

1030 L$=E$+”X 1“

 

 

 

 

 

 

 

 

‘ Letter

quality

 

1040 RM$=E$+’’kO’’+L$

 

 

 

 

 

 

 

‘ Roman

characters

 

10.s0 SA$=E$+” kl “+L$

 

 

 

 

 

 

‘Sanserif

characters

 

1060 CO$=E$+“k2“

+L$

 

 

 

 

 

 

‘Courier

characters

 

1070 PR$=E$+“k3“

+L$

 

 

 

 

 

 

‘Prestige

 

characters

 

1080 SC$=E.$+“k4“ +L.$

 

 

 

 

 

 

‘Script

characters

 

1090 H$=CHR$(9)

 

 

 

 

 

 

 

 

‘Horizontal

 

tab

 

i 100

PI$=E$+”P”

 

 

 

 

 

 

 

 

‘Pica

pitch

 

 

 

1110

Start

printing

 

 

 

 

 

 

 

 

 

 

 

 

1120 WIDTH “LPT1:

’’,255

 

 

 

 

 

 

 

 

‘Set

HT

 

1130

LPRINT

E$; ’’D” ;CHR$(3);CHR$(24)

 

;CHR$(0)

 

 

1140

LPRINT RM$; president

 

fonts are:”

 

 

 

 

 

 

1150

LPRINT

H$;D$;

”Draft

characters,”;

 

 

 

 

 

 

 

1160

LPRINT

H$;RM$; ”Roman

characters,

v

 

 

 

 

 

1170

LPRINT

H$;SA$;

’’Sanserif

 

characters,”;

 

 

 

 

 

 

1180

LPRINT

H$;CO$;

”COurier

characters,

 

 

 

 

 

1190

LPRINT

H$;PR$;”Prestige

 

characters,”;

 

 

 

 

 

 

1200

LpRINT H$;SC$;

’’Script

characters.

 

 

 

 

 

 

1210

LPRINT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1220

LPRINT

RM$; ”Print

 

pitches

are:”

 

 

 

 

 

 

 

1230

LPRINT

H$;PI$;

’’Pica

pitch

(10

CPI),”;

 

 

 

 

 

1240

LPRINT

H$;E$;

”M”;U Elite

pitch

 

(12

CPI),U

 

 

 

 

 

12s0

LPRINT

H$;E$;

”g “;’’Semi-condensed

 

pitch

(15

CPI),”;

 

1260

LPRINT H$;PI$;

 

 

 

 

 

 

 

‘Select

condensed

print

1270

LPR~NT CHR$(15);

 

 

 

 

 

 

1280

LPRINT

“Condensed

 

pica

pitch

(17

CPI),”

 

 

 

 

 

1290

LPRINT

H$:E$;

”M“;’ ’Condensed

elite

pitch

(20 CPI),”;

 

1300

LPRINT

CHR$(18)

 

 

 

 

 

 

‘Cancel

condensed

print

1310

LPRINT

H$;E$; ’’PI”:

 

 

 

 

 

‘Select

proportional

spacing

1320

LPRINT

PI$;

’’Normal

proportional,”;

 

 

 

 

 

 

 

1330

LPRINT

H$;CHR$(15);

” Condensed

 

proportional.

” ;

 

 

 

1340

LPRINT CHR$(18):

 

 

 

 

 

 

‘Cancel

proportional

spacing

1350

LPRINT

E$; ’’PO”

 

 

 

 

 

 

1360

LPRINT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1370

LPRINT

H$;E$;

’’wl’’D

oublebheightght

.“:E$;’’wo”

 

 

 

 

1380

LPRINT

H$;E$;”

W1’’;

’’Double

width,

“;E$;’’WO”

 

 

 

 

1390

LPRINT

H$;CHR$(28);

” E“;CHR$(2);

’’Triple

width,”;

 

 

 

1400 LPRINT CHR$(28) ;’’E’’;CHR$(O)

 

 

 

 

 

 

 

 

1410

LPRINT

H$;E$;

’’h”

;CHR$(l)

:“DOuble-sized.”

 

 

 

 

 

1420

LPRINT

H$;E$;

’’h’’

;CHR$(2)

:“Quad–sized.”;

 

 

 

 

 

1430 LPRINT E$;’’h’’;CHR$(O)

 

 

 

 

 

 

 

 

 

 

1440

LPRINT

:LPRINT

 

 

 

 

 

 

‘Set

right

margin

 

14s0

LPRINT

E$; ’’Q’’ ;CHR$(47)

 

 

 

 

 

1460

LPRINT

RM$: ’’Various

line

and

character

spacings:”

 

 

1470

LPRINT

E$; ’’al”

 

 

 

 

 

 

 

‘Center

text

 

 

1480

FOR 1=1

TO 7

 

 

 

 

 

 

 

‘Line spacing

set

 

1490

LPRINT

E$; ”AU;CHR$(I);

 

 

 

 

 

1500

LPRINT

E$:” “;CHR$(I);

 

 

 

 

‘Increase

 

character

space

1510 LPRINT “THE SPACINGS ARE CHANGED”

 

 

 

 

 

1520

NEXT I

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1530

FOR 1=7

TO 1 STEP -1

 

 

 

 

 

 

 

 

 

 

103

Page 112
Image 112
Star Micronics LC24-200 user manual Programming with Basic, 1110