4.3BSD/usr/man/man4/va.4

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)va.4	6.2 (Berkeley) 5/14/86
.\"
.TH VA 4 "May 14, 1986"
.UC 4
.SH NAME
va \- Benson-Varian interface
.SH SYNOPSIS
.B "controller va0 at uba0 csr 0164000 vector vaintr"
.br
.B "disk vz0 at va0 drive 0"
.SH DESCRIPTION
(\fBNOTE: the configuration description, while counter-intuitive,
is actually as shown above\fP.)
.PP
The Benson-Varian printer/plotter in normally used with the line printer
system.
This description is designed for those who wish to drive the Benson-Varian
directly.
.PP
In print mode, the Benson-Varian uses a modified ASCII character set.
Most control characters print various non-ASCII graphics such as daggers,
sigmas, copyright symbols, etc.
Only LF and FF are used as format effectors.  LF acts as a newline,
advancing to the beginning of the next line, and FF advances to the top of
the next page.
.PP
In plot mode, the Benson-Varian prints one raster line at a time.
An entire raster line of bits (2112 bits = 264 bytes) is sent, and
then the Benson-Varian advances to the next raster line.
.PP
.B Note:
The Benson-Varian must be sent an even number of bytes.
If an odd number is sent, the last byte will be lost.
Nulls can be used in print mode to pad to an even number of bytes.
.PP
To use the Benson-Varian yourself,
you must realize that you cannot open the device,
.I /dev/va0
if there is a daemon active.
You can see if there is an active daemon by doing a
.IR lpq (1)
and seeing if there are any files being printed.
Printing should be turned off using
.IR lpc (8).
.PP
To set the Benson-Varian into plot mode include the file
.RI < sys/vcmd.h >
and use the following
.IR ioctl (2)
call
.IP
ioctl(fileno(va), VSETSTATE, plotmd);
.PP
where
.I plotmd
is defined to be
.IP
\fBint\fR plotmd[] = { VPLOT, 0, 0 };
.PP
and
.I va
is the result of a call to
.I fopen
on stdio.
When you finish using the Benson-Varian in plot mode you should advance to
a new page
by sending it a FF after putting it back into print mode, i.e. by
.PP
'nf
	\fBint\fR prtmd[] = { VPRINT, 0, 0 };
	\&...
	fflush(va);
	ioctl(fileno(va), VSETSTATE, prtmd);
	write(fileno(va), "\ef\e0", 2);
.fi
.SH FILES
/dev/va0
.SH SEE ALSO
vfont(5),
lpr(1),
lpd(8),
vp(4)
.SH DIAGNOSTICS
The following error numbers are significant at the
time the device is opened.
.TP 10
[ENXIO]
The device is already in use.
.TP
[EIO]
The device is offline.
.PP
The following message may be printed on the console.
.PP
\fBva%d: npr timeout\fR.  The device was not able to get data from
the UNIBUS within the timeout period, most likely because some other
device was hogging the bus.  (But see BUGS below).
.SH BUGS
The 1's (one's) and l's (lower-case el's) in the Benson-Varian's
standard character set look very similar; caution is advised.
.PP
The interface hardware is rumored to have problems which can
play havoc with the UNIBUS.  We have intermittent minor problems on the
UNIBUS where our
.I va
lives, but haven't ever been able to pin them down
completely.