BSD 4_4 development
[unix-history] / usr / share / man / cat4 / vax / vp.0
VP(4) BSD Programmer's Manual (VAX Architecture) VP(4)
N\bNA\bAM\bME\bE
v\bvp\bp - Versatec interface
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
d\bde\bev\bvi\bic\bce\be v\bvp\bp0\b0 a\bat\bt u\bub\bba\ba0\b0 c\bcs\bsr\br 0\b01\b17\b77\b75\b51\b10\b0 v\bve\bec\bct\bto\bor\br v\bvp\bpi\bin\bnt\btr\br v\bvp\bpi\bin\bnt\btr\br
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The Versatec printer/plotter is normally used with the line printer sys-
tem. This description is designed for those who wish to drive the Ver-
satec directly.
To use the Versatec yourself, you must realize that you cannot open the
device, _\b/_\bd_\be_\bv_\b/_\bv_\bp_\b0 if there is a daemon active. You can see if there is a
daemon active by doing a lpq(1), and seeing if there are any files being
sent. Printing should be turned off using lpc(8).
To set the Versatec into plot mode you should include <_\bs_\by_\bs_\b/_\bv_\bc_\bm_\bd_\b._\bh> and
use the ioctl(2) call
ioctl(fileno(vp), VSETSTATE, plotmd);
where _\bp_\bl_\bo_\bt_\bm_\bd is defined to be
int plotmd[] = { VPLOT, 0, 0 };
and _\bv_\bp is the result of a call to fopen on stdio. When you finish using
the Versatec in plot mode you should eject paper by sending it a EOT af-
ter putting it back into print mode, i.e. by
int prtmd[] = { VPRINT, 0, 0 };
...
fflush(vp);
ioctl(fileno(vp), VSETSTATE, prtmd);
write(fileno(vp), "\04", 1);
F\bFI\bIL\bLE\bES\bS
/dev/vp0
D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
The following error numbers are significant at the time the device is
opened.
[ENXIO] The device is already in use.
[EIO] The device is offline.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
lpr(1), vtroff(1), va(4) font(5), lpd(8),
H\bHI\bIS\bST\bTO\bOR\bRY\bY
A v\bvp\bp driver appeared in Version 7 AT&T UNIX.
B\bBU\bUG\bGS\bS
The configuration part of the driver assumes that the device is set up to
vector print mode through 0174 and plot mode through 0200. As the con-
figuration program can't be sure which vector interrupted at boot time,
we specify that it has two interrupt vectors, and if an interrupt comes
through 0200 it is reset to 0174. This is safe for devices with one or
two vectors at these two addresses. Other configurations with 2 vectors
may require changes in the driver.
4th Berkeley Distribution June 5, 1993 1