Apple 310 manual Soh Ctl-A

Page 63

C H A P T E R 3

Communication Channels

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.

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

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.

Communication Protocols

51

Image 63
Contents Apple LaserWriter Select 310 Printer Limited Warranty on Media and Replacement Contents Page Communication Channels Page Figures and Tables Page What This Note Contains About This NoteOther Reference Material Conventions Used in This NoteApda For More InformationPage LaserWriter Select Hardware1 LaserWriter Select 310 Hardware ROM Serial Port for RS-232C Devices Communication Ports2An 8-pin serial port connector Centronics Parallel ConnectorPstrobe Signal Status Lights ROM Capability Memory CapabilitiesBatch Mode Basic OperationDram Expansion Types Interactive ModePaper Handling 7Paper handling options Page LaserWriter Select 310 Software Software Overview Adobe PostScript Programming LanguagePostScript Interpreter Types LaserWriter Select 310 DriverSelects the paper tray containing A4-size paper and sets Compatibility Operators Software ParametersProduct Strings Communication Device ParametersStatusdict Setting Compatibility Operators Device Idlefonts Setting System ParametersCheckpassword DefaulttimeoutsRamsize PrinternameProduct ProductASetdefaulttimeouts SetpasswordSetidlefonts Setprintername Setting Page Device ParametersDefaultmultipurposetraysize DefaultpapertrayPagestackorder ManualfeedtimeoutManualfeed MarginsSetdefaultmultipurposepapertraysize PapersizePapertray Setdefaultpapertray SetdostartpageSetmargins Setpagestackorder SetpagetypeSetpapertray Jobname Setting User ParametersJobtimeout SetjobtimeoutSetting Device Parameters WaittimeoutSetsoftwareiomode Setting Communication Parameters SoftwareiomodePacketbackchannel Setpacketbackchannel SccbatchSetting Engine Device Parameters SetsccbatchDarkness Currentpacking Setting Extensions to PostScript LevelSetdarkness CurrentcacheparamsSetcacheparams PackedarraySetpacking Printer Error ParameterPostScript Language Changes PrintererrorPacked Arrays Packed Arrays Versus Ordinary ArraysCreating Packed Arrays Immediately Evaluated Names Changes in Font Cache Operation Device Resolution ImagesEnd-of-Line Recognition New Operators TrueType FontsCommunication Channels Baud Rates Serial CommunicationParity Settings Flow ControlDTR Flow Control XON/XOFF Flow Control SCC Operator EncodingSimple Communication Protocol Communication ProtocolsBinary Communication Protocol SOH CTL-A Parallel Interface Communicating with an IBM PCDTR Flow Control for PC Communication Serial InterfaceXON/XOFF Flow Control for PC Communication Communication DynamicsStatus Queries and Spontaneous Messages Errorerror OffendingCommand operator %%