In the program that follows, we’ve used this technique to create some large numbers. Each digit is actually made up of four

characters-two horizontally by two vertically. This means, of course, that you must define and print four characters for each finished digit. We assigned the upper left quadrant of each digit to ASCII codes from 160 to 169, the upper right quadrant to codes 170 to 179, and so on. Figure 9-14 shows how one digit is defined, and Figure 9-l 5 shows the final output of our program.

Figure 9-15.Theoutput for characters like this must be carefully planned.

_

10 'Program to define and print numerals

20'Each numeral is made up of 4 characters (2 wide

x2 high)

30 OPEN "LPTl:" AS #l : WIDTH #l, 255

40 DOWN.CHAR.PROP$ = CHR$(27)+"pl"+CHR$(27)+"$1"

50 NOT.DOWN.CHAR.PROP$ = CHR$(27)+"p@"+CHR$(27)+"$4)" 60 LINE.7$ = CHR$(27)+"1" : LINE.12$ = CHR$(27)+"2"

70 PRINT #l, CHR$(27) "&l" CHR$(160) CHR$(200); 80 FOR I = 160 TO 200

100 READ M@

110 PRINT #l, CHR$(MQ));

124)FOR S = 1 TO 11

-.

-

-

98

Page 108
Image 108
Star Micronics SR-10/I5 user manual