Sample Program - Star Micronics LC24-20 User Manual

Multi-font
Table of Contents

Advertisement

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
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
WIDTH "LPT 1 : " ,255
LPRINT
CHR$ (27) ; "=" ;CHR$ ( 164) ;CHR$ (9) ; "#" ;
LPRINT
CHR$ (&HOF) ;CHR$ (&H80) : CHR$ (0) ;
' INDEX TABLE
LPRINT
CHR$ ( 1 ) ;
FOR 1=0
TO 59
LPRINT
STRING$ (9 , O) ;
NEXT I
FOR IT=l
TO 9 : READ MM : LPRINT
CHR$ (MM) ;
: NEXT IT
FOR IT=l
TO 9 :READ MM : LPRINT
CHR$ (MM) ;
:NEXT IT
FOR 1=62
TO 255
LPRINT
STRING$ (9 , O) ;
NEXT I
' DOT PATTERN
FOR DP= 1 TO 159
READ MM
LPRINT
CHR$ (MM) ;
NEX'f DP
' PRINTOUT
PROGRAM
LPRINT
CHR$ (27) ; "D" ;CHR$ ( 11 ) :CHR$(0)
LPRINT
CHR$ (27) ; "k" ;CHR$(4)
;
LPRINT
CHR$(27)
; "h" ;CHR$(I)
;
LPRINT
"
DIFFUSION
RANGES OF"
LPRINT
"
CARS & TELEPHONES
LPRINT
CHR$ (27) ; "h" ;CHR$(0)
;
LPRINT
CHR$(27)
; "k" :CHR$ (o)
LPRINT
"USA''; CHR$(9)
:
LPRINT
CHR$(27)
: "I" ;CHR$(6)
:
FOR 1=0
TO 681
STEP
25
:LPRINT
CHR$(60);
:NEXT I
LPRINT
LPRINT
CHR$(9);
FOR 1=0 TO 781
STEP
25
:LPRINT
CHR$(61);
:NEXT I
LPRINT
CHR$(27)
;''I'';CHR$(2)
LPRINT
"GERMANY''; C HR$(9)
:
LPRINT
CHR$(27)
;''I'';CHR$(6)
;
FOR 1=0
TO 412
STEP 25
:LPRINT
CHR$(60);
:NEXT I
LPRINT
LPRINT
CHR$(9);
FOR 1=0 TO 488
STEP
25
:LPRINT
CHR$(61):
:NEXT I
LPRINT
CHR$(27)
;''I'';CHR$(2)
LPRINT
"JAPAN'';CHR$(9);
130

Advertisement

Table of Contents
loading

Table of Contents