The remaining five bytes (m5 through m9) indicate the compression mask bits. Each bits shows the data that will translate the compressed dot pattern data back to the original character pattern.

For example, the compression mask bits of our telephone symbol are 011000000000010011110010 0000000001100000. So these bytes are 96, 4,242,0, and 96.

You must define the index table data for all characters from Oto 255. If you do not want to define a particular character, enter Ointo that index table data.

Sample program

To demonstrate how to define and to use the download characters in IBM mode, let’s use the “telephone” character and the other user-defined charac- ters to print a small graph. This program will do just that:

1000 WIDTH “LPT 1 : “ ,255

 

 

 

 

 

 

 

1010

LPRINT

CHR$ (27)

; “=”

;CHR$ ( 164)

;CHR$ (9)

; “#”

;

 

1020

LPRINT

CHR$ (&HOF) ;CHR$ (&H80)

: CHR$ (0)

;

 

 

1030

‘ INDEX

 

TABLE

 

 

 

 

 

 

 

 

1040

LPRINT CHR$ ( 1 ) ;

 

 

 

 

 

 

 

1050

FOR

1=0

 

TO

59

 

 

 

 

 

 

 

 

1060

LPRINT

STRING$

(9 , O) ;

 

 

 

 

 

 

1070

NEXT

I

 

 

 

 

 

 

 

 

 

 

 

1080

FOR

IT=l

 

TO

9

: READ

MM

: LPRINT

CHR$ (MM) ;

: NEXT

IT

1090

FOR

IT=l

 

TO

9

:READ

MM

: LPRINT

CHR$ (MM) ;

:NEXT

IT

1100

FOR

1=62

TO

255

 

 

 

 

 

 

 

1110

LPRINT

STRING$ (9 , O) ;

 

 

 

 

 

 

1120

NEXT

I

 

 

 

 

 

 

 

 

 

 

 

1130

‘ DOT PATTERN

 

 

 

 

 

 

 

 

1140

FOR

DP= 1

TO

159

 

 

 

 

 

 

 

1150

READ MM

 

 

 

 

 

 

 

 

 

 

1160

LPRINT

CHR$ (MM) ;

 

 

 

 

 

 

 

1170

NEX’f DP

 

 

 

 

 

 

 

 

 

 

 

1180

‘ PRINTOUT

PROGRAM

 

 

 

 

 

 

 

1190

LPRINT

CHR$ (27)

; “D” ;CHR$ ( 11 ) :CHR$(0)

 

 

 

1200

LPRINT

CHR$ (27)

; “k”

;CHR$(4)

;

 

 

 

 

1210

LPRINT

CHR$(27)

; “h”

;CHR$(I)

;

 

 

 

 

1220

LPRINT

 

DIFFUSION

RANGES

OF”

 

 

 

1230

LPRINT

 

CARS & TELEPHONES

 

 

 

 

1240

LPRINT

CHR$ (27)

; “h”

;CHR$(0)

;

 

 

 

 

1250

LPRINT

CHR$(27)

; “k” :CHR$ (o)

 

 

 

 

 

1260

LPRINT

“USA’’; CHR$(9)

:

 

 

 

 

 

 

1270

LPRINT

CHR$(27)

: “I”

;CHR$(6)

:

 

 

 

 

1280

FOR

1=0

 

TO

681

STEP

25

:LPRINT

CHR$(60);

:NEXT

I

1290

LPRINT

 

 

 

 

 

 

 

 

 

 

 

1300

LPRINT

CHR$(9);

 

 

 

 

 

 

 

 

1310

FOR

1=0

 

TO

781

STEP

25

:LPRINT

CHR$(61);

:NEXT

I

1320

LPRINT CHR$(27) ;’’I’’;CHR$(2)

 

 

 

 

 

1330

LPRINT

“GERMANY’’;CHR$(9)

:

 

 

 

 

 

1340

LPRINT

CHR$(27)

;’’I’’;CHR$(6)

;

 

 

 

 

1350

FOR

1=0

 

TO

412

STEP

25 :LPRINT CHR$(60);

:NEXT

I

1360

LPRINT

 

 

 

 

 

 

 

 

 

 

 

1370 LPRINT CHR$(9);

 

 

 

 

 

 

 

 

1380

FOR

1=0

 

TO

488

STEP

25

:LPRINT

CHR$(61):

:NEXT

I

1390 LPRINT CHR$(27) ;’’I’’;CHR$(2)

 

 

 

 

 

1400 LPRINT “JAPAN’’;CHR$(9);

 

 

 

 

 

 

130

Page 138
Image 138
Star Micronics LC24-20 user manual 130