5-41
6$03/(352*5$0)256,;(/&219(56,21
A second shortcut might be to use a program to convert the bit patterns into the sixel codes. The
following example program asks for 8 upper sixels, then for 8 lower sixels. The resulting codes
are stored as characters in a string, and then displayed. The program could be enhanced by using
the character string directly in a properly formatted Down-Line Load Character Font command.
This sample program runs on the IBM PC.
‘
===================================================
110
‘
Program to encode a TCS character into sixels.
120
‘
130
‘
The following DATA statements represent the
140
‘
letter “A”. Periods represent background pixels.
150
‘
Asterisks represent foreground pixels.
160
‘
========================================================
170
DATA “........”
180
DATA “...*....”
190
DATA “..*.*...”
200
DATA “.*...*..”
210
DATA “*.....*.”
220
DATA “*******.”
230
DATA “*.....*.”
240
DATA “*.....*.”
250
DATA “........”
260
DATA “........”
270
‘
280
DIM pixrow$(9)
‘ Array to hold rows of pixels.
290
DIM binval%(9)
‘ Array to hold powers of two.
300
‘
310
FOR row% = 0 to 9
‘ For each row in the character.
320
READ pixrow$(row%)
‘ Read in pixel row.
330
binval%(row%) = 2 ^ row%
‘ Compute powers of two.
340
NEXT row%
‘ Enfor.
350
360
PRINT “For this character, send the string: “;
370
‘ ________________________________________________________
380
‘ Compute sixels for the top six rows
390
‘ (in each column, the top six pixels form one sixel).
400
‘ _______________________________________________________
410
FOR column% = 1 TO 8
‘ For each column in the character.
420
sixel% = 63
‘
Start with the sixel value
430
‘
for no pixels lit.
440
FOR row% = 0 to 5
‘
For the top rows in the column.
450
pixelon% = 0
‘
Assume pixel is off.
Содержание Dynapro ET TCS
Страница 1: ......
Страница 127: ...5 40 LJXUH QFRGLQJ WKH 6L HOV...
Страница 194: ...6 4 LJXUH 7RXFKNH 9LVXDO WHQW...
Страница 310: ......
Страница 311: ......
Страница 312: ......
Страница 313: ......
Страница 314: ...ASCII Code Custom Character Pattern Chart ASCII Code ASCII Code ASCII Code...