Asynchronous Terminals and Printer Processes Programming Manual

PRINTER PROGRAMMING CONSIDERATIONS
Programming Considerations for DTR-Type Printers
Example
Assume that a DTR-type serial printer has a buffer size of 1000
bytes and is capable of receiving 200 bytes of data in a single
block. The printer hardware detects the high-water mark (buffer
nearly full) when the buffer contains 800 bytes and the low-
water mark (buffer nearly empty) when the buffer contains 250
bytes. The printer controls the flow of data from the host by
manipulating the DTR signal. After receipt of the first block,
the printer accepts data from the host four blocks at a time, as
follows:
Host sends block #1 ----> Printer buffer positions 0-199
The printer begins printing the first line.
Host sends block #2 ----> Printer buffer positions 200-399
Host sends block #3 ----> Printer buffer positions 400-599
Host sends block #4 ----> Printer buffer positions 600-799
Host sends block #5 ----> Printer buffer positions 800-999
Receipt of block #5 fills the buffer beyond the high-water mark.
The printer changes the state of the DTR signal, telling the host
to halt data transmission.
As the printer continues printing lines of data, the remaining
data migrates downward in the buffer. As block #4 is being
printed, block #5 momentarily resides in buffer positions 51-250.
At that point, the buffer reaches its low-water mark, and the
printer changes the state of the DTR signal, telling the host to
resume data transmission.
Host sends block #6 ----> Printer buffer positions 200-399
Host sends block #7 ----> Printer buffer positions 400-599
Host sends block #8 ----> Printer buffer positions 600-799
Host sends block #9 ----> Printer buffer positions 800-999
Receipt of block #9 fills the buffer beyond the high-water mark.
The printer changes the state of the DTR signal, telling the host
to halt transmission.
With some printers, operator-correctable faults (such as out
of paper or end of ribbon) and printer offline change the
state of DTR as though the high-water mark had been reached.
Some printers have a buffer status signal that indicates when
the buffer is full. The polarity definitions of DTR are not
standard. Some printers use the off or logic 0 state to halt
data transmission and the on or logic 1 state to resume it, while
others do the opposite. ATP6100 and SERIALPRINTPROCESS support
either definition with transmit pause and reverse channel, which
are described below.
7-20 November 1987