Asynchronous Terminals and Printer Processes Programming Manual

PROCEDURE CALLS FOR ACCESSING PRINTERS
Procedure Calls Summary
SETMODE sets and clears the following device-dependent
functions:
reset to configured values spacing control
auto perforation skip vertical tabs
get device status get device status
auto/control answer baud rate
horizontal pitch form length
| select character sets set transparency
See Appendix C for a summary of SETMODE
operations.
SETMODENOWAIT is used in the same way as SETMODE, except the
caller is not suspended while the call
completes.
WRITE writes information to a serial printer.
OPEN
Access a printer with the OPEN procedure. For example, to access
a printer with the device name "$PTR5530," include the following
code in your program:
INT .PTR [ 0:11 ] := [ "$PTR5530", 8 * [ " " ] ];
FILE^NUM,
.PTR^BUFFER[ 0:65 ];
LITERAL EXCL^ACC = %20;
.
CALL OPEN ( PTR, FILE^NUM, EXCL^ACC ); ! exclusive access
.
WRITE
To print a line of data, include the following:
CALL WRITE ( FILE^NUM, PTR^BUFFER, 132 );
This prints 132 characters of PTR^BUFFER.
6-2 November 1987