4.3BSD-UWisc/man/cat4/vp.4
VP(4) UNIX Programmer's Manual VP(4)
NAME
vp - Versatec interface
SYNOPSIS
device vp0 at uba0 csr 0177510 vector vpintr vpintr
DESCRIPTION
The Versatec printer/plotter is normally used with the line
printer system. This description is designed for those who
wish to drive the Versatec directly.
To use the Versatec yourself, you must realize that you can-
not open the device, /_d_e_v/_v_p_0 if there is a daemon active.
You can see if there is a daemon active by doing a _l_p_q(1),
and seeing if there are any files being sent. Printing
should be turned off using _l_p_c(8).
To set the Versatec into plot mode you should include
<_s_y_s/_v_c_m_d._h> and use the _i_o_c_t_l(2) call
ioctl(fileno(vp), VSETSTATE, plotmd);
where _p_l_o_t_m_d is defined to be
int plotmd[] = { VPLOT, 0, 0 };
and _v_p is the result of a call to _f_o_p_e_n on stdio. When you
finish using the Versatec in plot mode you should eject
paper by sending it a EOT after 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);
FILES
/dev/vp0
SEE ALSO
vfont(5), lpr(1), lpd(8), vtroff(1), va(4)
DIAGNOSTICS
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.
Printed 12/27/86 May 14, 1986 1
VP(4) UNIX Programmer's Manual VP(4)
BUGS
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 configuration 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.
Printed 12/27/86 May 14, 1986 2