[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

As mentioned before, it is possible to include printer commands (escape
sequences) in the character stream and send them to the printer using the
cmd_write device i/o command. it is also possible to use the printer
command names using the device I/O command prd_prtcommand with the
ioprtcmdreq data structure. this gives you a mnemonic way of setting the
printer to your program needs.

You send printer commands to the device by passing an ioprtcmdreq to the
device with prd_prtcommand set in io_command, the printer command set in
io_PrtCommand and up to four parameters set in Parm0 through Parm3.

   #include <devices/printer.h>

   PrintIO->iopc.io_PrtCommand = aSLRM;  /* Set left & right margins */
   PrintIO->iopc.io_Parm0 = 1;           /* Set left margin = 1 */
   PrintIO->iopc.io_Parm1 = 79;          /* Set right margin = 79 */
   PrintIO->iopc.io_Parm2 = 0;
   PrintIO->iopc.io_Parm3 = 0;
   PrintIO->iopc.io_Command = PRD_PRTCOMMAND;
   DoIO((struct IORequest *)PrintIO);

Consult the command function table listed below for other printer commands.

 printer command definitions