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- 15 shows the final output of our program.
0123456789
Figure 9-15. The output 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
x 2 high)
30 OPEN “LPTl :I’ AS #l : WIDTH #l, 255
40 DOWN.CHAR.PROP$ = CHR$(27)+“pl”+CHR$(27)+“$1”
50 NOT.DOWN.CHAR.PROP$ = CHR$(27)+“p0”+CHR$(27)+“$@”
60 LINE.7$ = CHR$(27)+“1” : LINE.12$ = CHR$(27)+“2”
74) PRINT 81, CHR$(27) “&l” CHR$(lGQ)) CHR$(200);
80 FOR I = 160 TO 200
100 READ MQ)
110 PRINT #l, CHR$(Mg);
124) FOR S = 1 TO 11
-
.-
.-
-
-
-
98