28
80 PRINT #1, CHR$(65)
'Restore the font character
The printout of running the program in TP UP-PN printer is shown below:
3.6 Printing Graphics Commands
ESC K
Set bit-map graphics
Format:
ASCII
:
ESC K
n1
n2
...
data ...
Decimal
:
27
75
n1
n2
...
data ...
Hexadecimal
:
1B
4B
n1
n2
...
data ...
Explanation:
The command set a n1
×
8 dot-matrix graphics. The width of the graphics
is n1 dots and the height is 8 dots. The 8 dots in each column can be indicated
by an 8-bit byte. The MSB is at the top position.
The value of n1 and n2 indicates a 16-bit binary code. n1 is used as the
lower byte and n2 the higher byte. The width of the bit -map graphics set by
ESC K command is determined by the formula n2
×
256+n1. According to
printer T P UP-PN, n2 should be 0 and n1 should range among 1 to the
maximum number of dots in one line specified by the model of printer.
The value of data corresponds to the byte of each dot column. The
quantity of bytes should equal n1.
For example: Printing two Chinese characters “
中文
” (Chinese) with
ESC K. The dot matrix of these two characters is shown as below. Each
character is composed of the 7X8 dot matrix in which dot columns are 7.
There is one dot -column space between two continual characters. So there are
total 15 dot columns and then n1=15, n2=0. All 15 bytes of the data indicated
by hexadecimal are shown as follows:
7C, 44, 44, FF, 44, 44, 7C, 00, 41, 62, 54, C8, 54, 62, 41.
29
The following BASIC program is in terms of the above instance.
10 PRINT #1, CHR$(27);"W";CHR$(2); 'enlarge in V & H
20 PRINT #1, CHR$(27);"K";CHR$(15)CHR$(0); 'ESC K
30 FOR I=1 TO 15
40 READ D: PRINT #1, CHR$(D); 'Input 15 bytes of data
50 NEXT I
60 PRINT #1, CHR$(13);
'Input CR
70 DATA &H7C,&H44,&H44,&HFF,&H44,&H44,&H7C,0
80 DATA &H41,&H62,&H54,&HC8,&H54,&H62,&H41
The printout in TP UP-PN is shown below:
ESC '
Print curving graph lines
Format:
ASCII
:
ESC '
m
n1
n2
...
nk
CR
Decimal
:
27
39
m
n1
n2
...
nk
13
Hexadecimal
:
1B
27
m
n1
n2
...
nk
0D
Explanation:
The command prints curving graph lines along direction of paper feeding.
The value of m is the quantity of curves. It ranges from 1 to the maximum
number of dots in one line specified by the model of printer. (Seeing at Section
1.1)
There are m dots in a horizontal dot line. n1, n2…nk represent positions
of m curves. The value of nk should equal the value m.
Each nk should be in the range of to the maximum number of dots in one
Summary of Contents for UP-PN24S
Page 25: ...Character code table 2...