Microcom 412 User Manual

Page 65

Advertising
background image

Chapter 6

Downloadable Graphic Images

412 Operators Manual

57

blank space (which is coded as large numbers of 0h bytes) or black space (coded as large
numbers of FFh bytes).

If a string of more than 255 0h or FFh bytes occurs, the byte-plus-count sequence may be
repeated as often as necessary to incorporate all occurrences of the byte. For example, a
string of 1132 FFh bytes in sequence can be encoded as:

FF FF FF FF FF FF FF FF FF 6B

The first four pairs of FFh each encode 256 bytes of FFh (one for the first byte and 255
copies), totaling 1024 bytes of FFh. The next FFh byte adds another, and the 6Bh adds 107
more copies. Thus, (4 x 256) + 1 + 107 = 1132 FFh bytes.

6.2.2 UNCOMPRESSED IMAGE COMMAND (^D104)
This command allows graphic images or fonts (fonts must be less than 64KB uncompressed)
to be transmitted in ASCII-HEX, thereby allowing all image data to pass over a 7 bit
connection. This command is useable on data connections that support 7 or 8 bit data.

The following is the format of ^D104 command when used with a graphic image file.

^A <slot number> ^D104
<rotation> <count> <image data>

Where:
<slot number> is a slot number, 1 through 255 (in ASCII). Note: The 412 uses the same TCI
for fonts and graphics. They are both accessed by using a TCI of 8. Therefore a font and a
graphic cannot have the same CGN number.

<rotation> is an 8-bit integer, 0 for an upright font and 1 for a 90-degree rotated image.

<count> is a 32-bit integer, least significant byte first. This is the number of bytes that the
image uses.

<image data> is the graphic image data, described in section 6.3, which has been converted to
ASCII-HEX. (The ASCII-HEX conversion is described below.)

ASCII-HEX Conversion
The ASCII-HEX conversion is preformed by OR’ing the most significant and least significant
nibbles of every byte with 30h.

For example: To convert the byte 6C to ASCII-HEX, simply OR the first and second nibbles
with 30h. This results in two bytes 36h and 3Ch. This conversion results in a file size that is
twice a big as the source. The main advantage is that the file can be easily transmitted across
a 7 bit data connection.

6.3

GRAPHIC IMAGE DATA FORMAT

The image data consists of a set of data structures and location offsets to those structures. All
data are stored in binary form. Multi-byte values are stored least-significant-byte first.

(Word is a 16-bit value, Byte is an 8-bit value, Label is a location within the file.)

Advertising