Microcom 466 User Manual

Page 63

Advertising
background image

Chapter 6

Downloadable Graphic Images

466 Operators Manual

57

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 (^D106)
This command allows graphic images or fonts 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 ^D106 command when used with a graphic image file.

^A <slot number> ^D106?
<rotation> <count> <image data>

Where:
<slot number> is a slot number, 1 through 255 (in ASCII). Note: The 466 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.

The following graphics file structure is offered to programmers who with to use their own
programs to convert graphic images.

Note: The 466 does not differentiate between graphics and fonts. They are both accessed by
using a TCI of 8. Therefore a font and a graphic cannot have the same CGN number. A
graphic is simply a font with only one character and all characters point to the same character.

Advertising