Binary Format - HP 262SA Reference Manual

Dual-system display terminal and word-processing terminal
Table of Contents

Advertisement

Graphics
Binary Format
In binary format all points are sent in a packed binary format. The coordinate values are sent
using the bit patterns of the ASCII characters listen in table D-7. The number of characters
required to specify a coordinate depends on the format used. The values for X and Y coordinates
can be from -16384 to 16383.
BINARYABSOLUTE FORMAT. Binary absolute data is plotted with respect to an origin at
0,0. Four bytes are required to specify a single end point. A 10 bit coordinate in the range
0-1023, is sent for both x and y.
The bytes are ordered as follows:
BIT
7
6
5
4
3
2
1
BYTE 1
a
1
X9
X8
X7
X6
XS
HI X
BYTE 2
a
1
X4
X3
X2
X1
XO
LOW X
BYTE 3
a
1
Y9
Y8
Y7
Y6
YS
HI Y
BYTE 4
a
1
Y4
Y3
Y2
Y1
YO
LOW Y
Although it is possible to send coordinates in the range
°
to 1023 , only points in the range 0-511
for X, and 0-389 for Yare visible on the screen. Vectors going off the screen are clipped. If the
data requires scaling, this must be done before the data is sent to the terminal.
The following example shows how the 4 data bytes are computed. The numbers are converted to
the 10 bit binary equivalent. Bits 7 and 6 are set to 01 to indicate a parameter.
x
=
a
= 00000 00000
Y =
a
00000 00000
HI X LOW X
HI Y LOW Y
BYTE 1
01 00000
SPACE HI X
BYTE 2
01 00000
SPACE LOW X
BYTE 3
01 00000
SPACE HI Y
BYTE 4
01 00000
SPACE LOW Y
X
360
01011 01000
Y = 180
00101 101 00
HI X LOW X
HI Y LOW Y
BYTE 1
01 01011
+
HI X
BYTE 2
01 01000
(
LOW X
BYTE 3
01 001 01
/
HI Y
BYTE 4
01 10100
4 LOW Y
An escape sequence to draw a vector from 0,0 to 360,180 is as follows:
Ec
*
p i a SP
SP
SP
SP
+ (
/
4
Z
X=O/
Y=O/
X=360/
Y=180/
Ec * p selects a plotting sequence. The CC
i "
specifies absolute format. The cCa"raises the pen up.
The first 4 bytes (all spaces) move the raised pen to 0,0 where it is lowered. The next 4 bytes
specify the point 360,180. Mter the 4th byte is received, the pen is moved to that point, drawing
a vector. The upper case
ttz"
terminates the escape sequence. Note that if spaces are used in the
data sequence they are interpreted as data and could result in an improper plot.
D-31

Advertisement

Table of Contents
loading

This manual is also suitable for:

2628a

Table of Contents