beautypg.com

Communicating with an ibm pc, Parallel interface, Communicating with an ibm pc 3 – Apple LaserWriter Select 310 Printer User Manual

Page 64: Parallel interface 3

background image

C H A P T E R 3

Communication Channels

52

Communicating with an IBM PC

After CTL-A is received, the next character received that is not one of the special
characters must be the result of XORing one of the special characters with 40 hex. If any
other character is received, it is considered to be an input error. Any number of special
characters may appear between CTL-A and the XORed character, with the exception of
special characters CTRL-D and CTRL-A, which are handled asynchronously. If either of
these characters is received between CTL-A and the XORed character, it is considered to
be an error condition.

If a special character arrives unquoted and it specifies no control function for the channel,
the character is simply discarded. For example, if XON or XOFF is received
and XON/XOFF flow control is not in use, it is discarded.

IMPORTANT

CTL-E and CTL-\ currently specify no control functions and should
not be sent to the LaserWriter Select 310 printer. They are included in the
list of quoted characters in case new control functions are added in
the future.

In contrast to simple protocol, with binary protocol there is no mapping between
end-of-line conventions. The end-of-line characters (, , or ) sent by
the host are exactly what is received by the interpreter in the printer. The PostScript
scanner handles the different end-of-line conventions in a uniform way, but a program
that reads data from the channel directly (via read or readstring) receives whatever
characters are sent by the host. Similarly, output is generated by a PostScript program
(via print or =) is sent unchanged.

Note

In this connection, the standard end-of-line in the PostScript
language (\n in a PostScript language string) is .

Communicating with an IBM PC

3

You may connect the LaserWriter Select 310 printer to an IBM PC through either the
Centronics 36-pin parallel connector or the RS-232 serial port. The physical characteristics
of the connectors are described in Chapter 1, in the sections “Centronics Parallel
Connector” and “Serial Port for RS-232C Devices.” This section describes the software
support for the interface.

Parallel Interface

3

To set up the parallel port for communication between the LaserWriter Select 310 and the
IBM PC, issue the following command:

MODE LPT1:,,P

This command allows the Centronics busy signal to be active for extended periods
of time.