You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Set Position (SPX)<br />
Byte Position Bytes Field Name Description<br />
Chapter 4. Record Formats<br />
Set Position (SPX)<br />
The SPX record sets the starting position at a specific point on the page.<br />
The next printed line or space will start at this position. The X and Y<br />
coordinates in this record identify a starting position relative to the current<br />
origin. The origin is set to 0,0 by SDC, SOD, SOP, WFC, and CSR and to<br />
the current cursor position by SOR.<br />
When the starting position is set, the top left corner of the first character in<br />
the next printed line will be at that position. Printed lines and spaces<br />
subsequent to this record continue in the direction of the current font.<br />
Refer to Chapter 1 for a discussion of font direction.<br />
The effect of the SPX record will continue until another SPX, SPO, SRP,<br />
or CSR record, a start of page record (SOP or WFC), or a start of<br />
document record (SOD or SDC) is received. The top of page X,Y position<br />
of 0,0 is set by each SOP, WFC, SOD, CSR, and SDC record.<br />
This record performs in the same manner as the SPO record. The only<br />
difference is that the SPX record has 32-bit X and Y fields so that larger<br />
numbers can be specified.<br />
1-2 2 Record Length The length of this record, in binary, including the record length field.<br />
For example, hex 00 0C specifies a record length of 12 bytes.<br />
3 1 Cyclic Record Count A binary cyclic record count using modulo 256. Each record in the<br />
job is counted, starting with hex 01 for the first record. The 255th<br />
record is hex FF and the 256th record is hex 00. This count is used<br />
to verify record sequence.<br />
4 1 Control Code A binary code that identifies the record type. A value of hex 3C<br />
identifies the SPX record.<br />
5-8 4 X Position A signed binary number representing the X coordinate value in dots<br />
relative to the current origin. Negative values are represented using<br />
the two's complement form. For example, hex 00 00 19 00<br />
specifies an X value of 6400 dots and FF FF E7 00 specifies an X<br />
value of -6400 dots. The useful range is printer dependent and also<br />
dependent upon the current cursor origin. Refer to Chapter 1 for a<br />
description of X position.<br />
9-12 4 Y Position A signed binary number representing the Y coordinate value in dots<br />
relative to the current origin. Negative values are represented using<br />
the two's complement form. For example, hex 00 00 8C A0<br />
specifies a Y value of 36000 dots and FF FF 73 60 specifies a Y<br />
value of -36000 dots. The useful range is printer dependent and<br />
also dependent upon the current cursor origin. Refer to Chapter 1<br />
for a description of Y position.<br />
The following illustration shows how the starting position set by an SPX<br />
record is used by the different font orientations.<br />
Reference Guide 4 - 33