Apple LaserWriter Select 310 Printer User Manual

Page 63

Advertising
background image

C H A P T E R 3

Communication Channels

Communication Protocols

51

Since any character code can be transmitted as data with this protocol, it can be used for
sending PostScript language jobs that contain binary images. Binary protocol is set by
default when the LaserWriter Select 310 printer is powered on. It may also be selected by
setting softwareiomode to 100.

This protocol requires that a quoting character be inserted at certain places in the data
stream and that the character codes for certain characters be altered. Therefore, the host
computer must filter binary data before sending it to the printer. When the protocol is
enabled, it is used for transmission in both directions. The host should therefore filter any
data it receives from the printer. Filtering may be done by an application program or
within the operating system of the host. In the case of the LaserWriter Select 310 printer,
the Apple LaserWriter driver does this filtering. Table 3-5 lists the control characters for
the binary serial protocol.

To transmit the control characters as data, the characters must be quoted. This means that
the character being sent is replaced by a two-character sequence consisting of control
character CTL-A, which indicates a quoted data byte, followed by the character itself
XORed with 40 hex. For example, if the host wants to send a request for printer status
(hex value 14), it sends 01 hex-54.

This method of quoting means that whenever one of the eight special characters is
received, the control function is intended, regardless of whether or not the preceding
character is CTL-A. Asynchronous control characters may therefore be generated and
processed at a lower level than the data stream may be generated and consumed. On a
host machine, the user program may implement the CTL-A quoting convention, while
the operating system is independently performing XON/XOFF processing.

Note

All byte values other than those of the eight special
characters are transmitted by simply sending the value.

Table 3-5

Control characters in binary serial protocol

Hex value

ASCII name

ASCII keyboard

Control function

01

SOH

CTL-A

Quote data byte

03

ETX

CTL-C

Abort job and flush to end of file

04

EOT

CTL-D

End-of-job marker

05

ENQ

CTL-E

None

11

DC1

CTL-Q

XON in XON/XOFF flow control

13

DC3

CTL-S

XOFF in XON/XOFF flow control

14

DC4

CTL-T

Request printer status

1C

FS

CTL-\

None

Advertising