28
30 LPRINT CHR$(
&
H02)
;
CHR$(
&
H7C)
;
CHR$(
&
H40)
;
40 LPRINT CHR$(
&
HC0)
;
CHR$(
&
H40)
;
CHR$(
&
H00)
;
50 LPRINT CHR$(27)
;
“%”
;
CHR$(65)
;
CHR$(65)
;
CHR$(0)
;
’ESC % command
60 LPRINT CHR$(65)
;
CHR$(13)
;
‘print user-defined character
70 LPRINT CHR$(27)
;
CHR$(58)
;
‘ESC
:
command
80 LPRINT CHR$(65)
;
‘print original character
The print result of the above programs is as following:
4.2.5 Graphics Printing and Codepage Choosing Commands
ESC K
Print bit-map graphics
Format: ASCII
:
ESC K
n1 n2….data…..
Decimal:
27
75
n1 n2….data…..
Hexadecimal: 1B
4B
n1
n2….data…..
Explanation:
This command is used to print (n1) ×8bit map. The width of this graphics is
(n2×256+n1) dots and the height is 8 dots. Each column has 8 dots and can be presented
by a 8-bit byte, the MSB is on the top.
The values of n1, n2 denote a 16-bit binary data, n1 is LSB, n2 is MSB, which mean that
the width of printed bitmap through ESC K command is n1. In our printer series,
n2=0/1. The sum of dots number should be ≤384. Data are the bytes content of each
column in this graphics. The bytes number should equal to n1.
Remark: If the width of printed graphics is beyond the remaining width of current line, the
beyond part of graphics won’t be printed out and the printed position will change to the
next line.
For example: If you want to print two Chinese characters “
中文
” with ESC K command, the
bit- map for the two Chinese is as the below figure shows. Each character is composed by
7 × 8 dots to 7 columns, there is a space between the two characters, so totally there are
15 columns, then n1=15, n2=0, the 15-byte data showed in hexadecimal are as follows:
7C, 44, 44, FF, 44, 44, 7C, 00, 41, 62, 54, C8, 54, 62, 41
Содержание SP-RMD12
Страница 39: ...37 n 2 Off line status n 3 Error status n 4 paper feeding status...
Страница 47: ...45 Characters Set 2...
Страница 48: ...46...