# To unbundle, run this file echo cat.4 sed 's/.//' >cat.4 <<'//GO.SYSIN DD cat.4' -.TH CAT 4 -.SH NAME -cat \- phototypesetter interface -.SH DESCRIPTION -.I Cat -provides the interface to a Graphic Systems C/A/T -phototypesetter. -Bytes written on the file specify font, size, and other control -information as well as the characters to be flashed. -The coding will not be described here. -.PP -Only one process may have -this file open at a time. -It is write-only. -.SH FILES -/dev/cat -.SH "SEE ALSO" -troff(1) -.br -Phototypesetter interface specification //GO.SYSIN DD cat.4 echo dn.4 sed 's/.//' >dn.4 <<'//GO.SYSIN DD dn.4' -.TH DN 4 -.SH NAME -dn \- DN-11 ACU interface -.SH DESCRIPTION -The -.I dn? -files -are write-only. -The permissible codes are: -.TP -0-9 -dial 0-9 -.br -.ns -.TP -.B : -dial * -.br -.ns -.TP -.B ; -dial # -.br -.ns -.TP -\- -4 second delay for second dial tone -.br -.ns -.TP -< -end-of-number -.PP -The entire telephone number must be -presented in a single -.I write -system call. -.PP -It is recommended that an end-of-number -code be given even though not all -ACU's actually require it. -.DT -.SH FILES -/dev/dn0 connected to 801 with dp0 -.br -/dev/dn1 not currently connected -.br -/dev/dn2 not currently connected -.SH "SEE ALSO" -dp(4) //GO.SYSIN DD dn.4 echo du.4 sed 's/.//' >du.4 <<'//GO.SYSIN DD du.4' -.TH DU 4 -.SH NAME -du, dp \- DU-11 201 data-phone interface -.SH DESCRIPTION -The -.I dp0 -file -is a 201 data-phone interface. -.I Read -and -.I write -calls -to dp0 -are limited to a maximum of 512 bytes. -Each write call is sent as a single record. -Seven bits from each byte -are written along with an eighth odd parity -bit. -The sync must be user supplied. -Each read call returns characters received from a -single record. -Seven bits are returned unaltered; the eighth bit -is set if the byte was not received in odd parity. -A 10 second time out is set and a zero-byte -record is returned if nothing is received in that time. -.SH FILES -/dev/dp0 -.SH "SEE ALSO" -dn(4) -.SH BUGS -The name -.I dp0 -is a historical dreg. //GO.SYSIN DD du.4 echo hp.4 sed 's/.//' >hp.4 <<'//GO.SYSIN DD hp.4' -.TH HP 4 -.SH NAME -hp \- RH-11/RP04, RP05, RP06 moving-head disk -.SH DESCRIPTION -The octal representation of the minor device number is encoded -.IR idp , -where -.I i -is an interleave flag, -.I d -is a physical drive number, -and -.I p -is a pseudodrive (subsection) within a physical unit. -If -.I i -is 0, -the origins and sizes of the pseudodisks on each drive, -counted in cylinders of 418 512-byte blocks, are: -.nf -.PP - disk start length - 0 0 23 - 1 23 21 - 2 0 0 - 3 0 0 - 4 44 386 - 5 430 385 - 6 44 367 - 7 44 771 -.fi -.PP -If -.I i -is 1, the minor device consists of the specified -pseudodisk on drives numbered 0 through the designated -drive number. -Successively numbered blocks are distributed -across the drives in rotation. -.PP -Systems distributed for these devices -use disk 0 for the root, disk 1 for swapping, and -disk 4 (RP04/5) or disk 7 (RP06) for a mounted -user file system. -.PP -The -block -files -access the disk via the system's normal -buffering mechanism -and may be read and written without regard to -physical disk records. -.PP -A `raw' interface -provides for direct transmission between the disk -and the user's read or write buffer. -A single read or write call results in exactly one I/O operation -and therefore raw I/O is considerably more efficient when -many words are transmitted. -The names of the raw files -conventionally -begin with -an extra `r.' -In raw I/O the buffer must begin on a word boundary, -and raw I/O to an interleaved device is likely to have -disappointing results. -.SH FILES -/dev/rp?, /dev/rrp? -.SH SEE ALSO -rp(4) -.SH BUGS -In raw I/O -.I read -and -.IR write (2) -truncate file offsets to 512-byte block boundaries, -and -.I write -scribbles on the tail of incomplete blocks. -Thus, -in programs that are likely to access raw devices, -.I read, write -and -.IR lseek (2) -should always deal in 512-byte multiples. -.PP -Raw device drivers don't work on interleaved devices. //GO.SYSIN DD hp.4 echo hs.4 sed 's/.//' >hs.4 <<'//GO.SYSIN DD hs.4' -.TH HS 4 -.SH NAME -hs \- RH11/RS03-RS04 fixed-head disk file -.SH DESCRIPTION -The files -.I "hs0 ... hs7" -refer to -RJS03 disk drives 0 through 7. -The files -.I "hs8 ... hs15" -refer to -RJS04 disk drives 0 through 7. -The RJS03 drives are each 1024 blocks long and -the RJS04 drives are 2048 blocks long. -.PP -The -.I hs -files -access the disk via the system's normal -buffering mechanism -and may be read and written without regard to -physical disk records. -There is also a `raw' inteface -which provides for direct transmission between the disk -and the user's read or write buffer. -A single read or write call results in exactly one I/O operation -and therefore raw I/O is considerably more efficient when -many words are transmitted. -The names of the raw HS files begin with -.IR rhs . -The same minor device considerations -hold for the raw interface as for the normal interface. -.PP -In raw I/O the buffer must begin on a word boundary, -and counts should be a multiple of 512 bytes -(a disk block). -Likewise -.I lseek -calls should specify a multiple of 512 bytes. -.SH FILES -/dev/hs?, /dev/rhs? //GO.SYSIN DD hs.4 echo ht.4 sed 's/.//' >ht.4 <<'//GO.SYSIN DD ht.4' -.TH HT 4 -.SH NAME -ht \- RH-11/TU-16 magtape interface -.SH DESCRIPTION -The files -.I mt0, mt1, ... -refer to the DEC RH/TM/TU16 magtape. -When opened for reading or writing, -the tape is not rewound. -When closed, it is rewound (unless the 0200 bit is on, see below). -If the tape was open for writing, a double end-of-file is written. -If the tape is not to be rewound the -tape is backspaced to just between the two -tapemarks. -.PP -A standard tape consists of a -series of 512 byte records terminated by a double -end-of-file. -To the extent possible, the system makes -it possible, if inefficient, to treat -the tape like any other file. -Seeks have their usual meaning and it is possible -to read or write a byte at a time. -Writing in very small units is inadvisable, -however, because it tends to create monstrous record -gaps. -.PP -The last octal digit of the minor device -number selects the drive. -The middle digit selects a controller. -The initial digit is even to select 800 BPI, -odd to select 1600 BPI. -If the 0200 bit is on (initial digit 2 or 3), the tape is not rewound -on close. -Note that the -minor device number has no necessary connection -with the file name, and in fact -.IR tp (1) -turns the short name -.I x -into -.RI `/dev/mt x '. -.PP -The -.I mt -files discussed above are useful -when it is desired to access the tape in a way -compatible with ordinary files. -When foreign tapes are to be dealt with, and especially -when long records are to be read or written, the -`raw' interface is appropriate. -The associated files may be named -.I "rmt0, ..., rmt7," -but the same minor-device considerations -as for the regular files still apply. -.PP -Each -.I read -or -.I write -call reads or writes the next record on the tape. -In the write case the record has the same length as the -buffer given. -During a read, the record size is passed -back as the number of bytes read, provided it is no greater -than the buffer size; -if the record is long, an error is indicated. -In raw tape I/O, the buffer must begin on a word boundary -and the count must be even. -Seeks are ignored. -A zero count is returned when a tape mark is read; -another read will fetch the first record of the -next tape file. -.SH FILES -/dev/mt?, -/dev/rmt? -.SH "SEE ALSO" -tp(1) -.SH BUGS -The magtape system is supposed to be able -to take 64 drives. -Such addressing has never been tried. -.PP -Taking a drive off line, or running off the end of tape, -while writing have been known to hang the system. -.PP -If any non-data error is encountered, it refuses to do anything -more until closed. -In raw I/O, there should be a way -to perform forward and backward record and file spacing and -to write an EOF mark explicitly. //GO.SYSIN DD ht.4 echo mem.4 sed 's/.//' >mem.4 <<'//GO.SYSIN DD mem.4' -.TH MEM 4 -.SH NAME -mem, kmem \- core memory -.SH DESCRIPTION -.I Mem -is a special file that is an image of the core memory -of the computer. -It may be used, for example, to examine, -and even to patch the system. -.I Kmem -is the same as -.I mem -except that kernel virtual memory -rather than physical memory is accessed. -.PP -Byte addresses -are interpreted as memory addresses. -References to non-existent locations return errors. -.PP -Examining and patching device registers is likely -to lead to unexpected results when read-only or write-only -bits are present. -.PP -On PDP11's, the I/O page -begins at location 0160000 of -.I kmem -and per-process data for the current process -begins at 0140000. -.SH FILES -/dev/mem, -/dev/kmem -.SH BUGS -On PDP11's, memory files are accessed one byte -at a time, an inapproriate method for some -device registers. //GO.SYSIN DD mem.4 echo null.4 sed 's/.//' >null.4 <<'//GO.SYSIN DD null.4' -.TH NULL 4 -.SH NAME -null \- data sink -.SH DESCRIPTION -Data written on -a null special file -is discarded. -.PP -Reads from -a null special file -always return 0 bytes. -.SH FILES -/dev/null //GO.SYSIN DD null.4 echo pk.4 sed 's/.//' >pk.4 <<'//GO.SYSIN DD pk.4' -.TH PK 4 local -.SH NAME -pk \- packet driver -.SH DESCRIPTION -The packet driver -implements a full-duplex end-to-end flow control strategy -for machine-to-machine communication. -Packet driver protocol is established by -calling -.IR pkon (2) -with a character device file descriptor and -a desired packet size in bytes. -The packet size must be a power of 2, -.RI 32\(<= size \(<=4096. -The file descriptor -must represent an 8-bit data path. -This is normally obtained by setting -the device in raw mode -(see -.IR ioctl (2)). -.PP -The actual packet size, which may be smaller than -the desired packet size, is arrived at by -negotiation with the packet driver -at the remote end of the data link. -.PP -The packet driver maintains two -data areas -for incoming and outgoing packets. -The output area is needed to implement retransmission -on errors, -and -arriving packets are queued in the input area. -Data arriving for a file not open for reading is discarded. -Initially the size of both areas is set -to two packets. -.PP -It is not necessary that reads and writes -be multiples of the packet size although -there is less system overhead if they are. -Read operations return the maximum amount of data -available from the input area up to the -number of bytes specified in the system call. -The buffer sizes in write operations -are not normally transmitted across the link. -However, writes of zero length are treated specially -and are reflected at the remote end as a -zero-length read. -This facilitates marking the serial byte stream, -usually for delimiting files. -.PP -When one side of a packet driver link is shut down by -.IR close (2) or -.I pkoff -(see -.IR pkon (2)), -.IR read (2) -on the other side will return 0, and -.I write -on the other side -will raise a SIGPIPE signal. -.SH "SEE ALSO" -pkon(2), pkopen(3) //GO.SYSIN DD pk.4 echo rf.4 sed 's/.//' >rf.4 <<'//GO.SYSIN DD rf.4' -.TH RF 4 -.SH NAME -rf \- RF11/RS11 fixed-head disk file -.SH DESCRIPTION -This file refers to the -concatenation of all RS-11 disks. -.PP -Each disk contains 1024 256-word blocks. -The length of the combined RF file is -1024\(mu(minor+1) blocks. -That is minor device zero -is taken to be -1024 blocks long; -minor device one is 2048, -etc. -.PP -The -.I rf0 -file -accesses the disk via the system's normal -buffering mechanism -and may be read and written without regard to -physical disk records. -There is also a `raw' interface -which provides for direct transmission between the disk -and the user's read or write buffer. -A single read or write call results in exactly one I/O operation -and therefore raw I/O is considerably more efficient when -many words are transmitted. -The name of the raw RF file is -.IR rrf0 . -The same minor device considerations -hold for the raw interface as for the normal interface. -.PP -In raw I/O the buffer must begin on a word boundary, -and counts should be a multiple of 512 bytes -(a disk block). -Likewise -.I seek -calls should specify a multiple of 512 bytes. -.SH FILES -/dev/rf0, /dev/rrf0 -.SH BUGS -The 512-byte restrictions on the raw device are not -physically necessary, -but are still imposed. //GO.SYSIN DD rf.4 echo rk.4 sed 's/.//' >rk.4 <<'//GO.SYSIN DD rk.4' -.TH RK 4 -.SH NAME -rk \- RK-11/RK03 or RK05 disk -.SH DESCRIPTION -.I Rk? -refers to an entire disk as a single sequentially-addressed -file. -Its 256-word blocks are numbered 0 to 4871. -Minor device numbers are drive numbers on one controller. -.PP -The -.I rk -files -discussed above access the disk via the system's normal -buffering mechanism -and may be read and written without regard to -physical disk records. -There is also a `raw' interface -which provides for direct transmission between the disk -and the user's read or write buffer. -A single read or write call results in exactly one I/O operation -and therefore raw I/O is considerably more efficient when -many words are transmitted. -The names of the raw RK files -begin with -.I rrk -and end with a number which selects the same disk -as the corresponding -.I rk -file. -.PP -In raw I/O the buffer must begin on a word boundary, -and counts should be a multiple of 512 bytes -(a disk block). -Likewise -.I seek -calls should specify a multiple of 512 bytes. -.SH FILES -/dev/rk?, /dev/rrk? -.SH BUGS -In raw I/O -.I read -and -.IR write (2) -truncate file offsets to 512-byte block boundaries, -and -.I write -scribbles on the tail of incomplete blocks. -Thus, -in programs that are likely to access raw devices, -.I read, write -and -.IR lseek (2) -should always deal in 512-byte multiples. //GO.SYSIN DD rk.4 echo rp.4 sed 's/.//' >rp.4 <<'//GO.SYSIN DD rp.4' -.TH RP 4 -.SH NAME -rp \- RP-11/RP03 moving-head disk -.SH DESCRIPTION -The files -.I "rp0 ... rp7" -refer to sections of RP disk drive 0. -The files -.I "rp8 ... rp15" -refer to drive 1 etc. -This allows a large disk to be broken up -into more manageable pieces. -.PP -The origin and size of the pseudo-disks on each drive are -as follows: -.PP -.br - disk start length -.br - 0 0 81000 -.br - 1 0 5000 -.br - 2 5000 2000 -.br - 3 7000 74000 -.br - 4-7 unassigned -.PP -Thus rp0 covers the whole drive, -while rp1, rp2, rp3 can serve usefully as a root, swap, and -mounted user file system respectively. -.PP -The -.I rp -files -access the disk via the system's normal -buffering mechanism -and may be read and written without regard to -physical disk records. -There is also a `raw' interface -which provides for direct transmission between the disk -and the user's read or write buffer. -A single read or write call results in exactly one I/O operation -and therefore raw I/O is considerably more efficient when -many words are transmitted. -The names of the raw RP files -begin with -.I rrp -and end with a number which selects the same disk -section as the corresponding -.I rp -file. -.PP -In raw I/O the buffer must begin on a word boundary. -.SH FILES -/dev/rp?, /dev/rrp? -.SH SEE ALSO -hp(4) -.SH BUGS -In raw I/O -.I read -and -.IR write (2) -truncate file offsets to 512-byte block boundaries, -and -.I write -scribbles on the tail of incomplete blocks. -Thus, -in programs that are likely to access raw devices, -.I read, write -and -.IR lseek (2) -should always deal in 512-byte multiples. //GO.SYSIN DD rp.4 echo tc.4 sed 's/.//' >tc.4 <<'//GO.SYSIN DD tc.4' -.TH TC 4 -.SH NAME -tc \- TC-11/TU56 DECtape -.SH DESCRIPTION -The files -.I "tap0 ... tap7" -refer to the -TC-11/TU56 DECtape drives 0 to 7. -.PP -The 256-word blocks on a standard DECtape are numbered 0 to 577. -.SH FILES -/dev/tap? -.SH "SEE ALSO" -tp(1) //GO.SYSIN DD tc.4 echo tm.4 sed 's/.//' >tm.4 <<'//GO.SYSIN DD tm.4' -.TH TM 4 -.SH NAME -tm \- TM-11/TU-10 magtape interface -.SH DESCRIPTION -The files -.I "mt0, ..., mt7" -refer to the DEC TU10/TM11 magtape. -When closed it can be rewound or not, see below. -If it was open for writing, two end-of-files are written. -If the tape is not to be rewound -it is positioned with the head between the two -tapemarks. -.PP -If the 0200 bit is on in the minor device number the -tape is not rewound when closed. -.PP -A standard tape consists of a -series of 512 byte records terminated by an -end-of-file. -To the extent possible, the system makes -it possible, if inefficient, to treat -the tape like any other file. -Seeks have their usual meaning and it is possible -to read or write a byte at a time. -Writing in very small units is inadvisable, -however, because it tends to create monstrous record -gaps. -.PP -The -.I mt -files discussed above are useful -when it is desired to access the tape in a way -compatible with ordinary files. -When foreign tapes are to be dealt with, and especially -when long records are to be read or written, the -`raw' interface is appropriate. -The associated files are named -.I "rmt0, ..., rmt7." -Each -.I read -or -.I write -call reads or writes the next record on the tape. -In the write case the record has the same length as the -buffer given. -During a read, the record size is passed -back as the number of bytes read, provided it is no greater -than the buffer size; -if the record is long, an error is indicated. -In raw tape I/O, the buffer must begin on a word boundary -and the count must be even. -Seeks are ignored. -A zero byte count is returned when a tape mark is read, -but another read will fetch the first record of the -new tape file. -.SH FILES -/dev/mt?, -/dev/rmt? -.SH "SEE ALSO" -tp(1) -.SH BUGS -If any non-data error is encountered, it refuses to do anything -more until closed. -In raw I/O, there should be a way -to perform forward and backward record and file spacing and -to write an EOF mark. //GO.SYSIN DD tm.4 echo tty.4 sed 's/.//' >tty.4 <<'//GO.SYSIN DD tty.4' -.TH TTY 4 -.SH NAME -tty \- general terminal interface -.SH DESCRIPTION -This section describes -both a particular special file, -and the general nature of the terminal interface. -.PP -The file -.I /dev/tty -is, in each process, a synonym -for the control terminal associated with that process. -It is useful for programs that wish to -be sure of writing messages on the terminal -no matter how output has been redirected. -It can also be used for programs that demand a file name -for output, when typed output is desired -and it is tiresome to find out which terminal -is currently in use. -.PP -As for terminals in general: all of the low-speed asynchronous -communications ports use the -same general interface, no matter what -hardware is involved. -The remainder of this section discusses -the common features of the interface. -.PP -When a terminal file is opened, it causes -the process to wait until a connection is established. -In practice user's programs seldom open these -files; they are opened by -.I init -and become a user's -input and output file. -The very first terminal file open in a process becomes -the -.I "control terminal" -for that process. -The control terminal plays a special -role in handling quit or interrupt signals, as discussed -below. -The control terminal is inherited by a child process during a -.IR fork , -even if the control terminal is closed. -The set of processes that thus share a control terminal -is called a -.I process -.IR group ; -all members of a process group receive certain signals -together, see DEL below and -.IR kill (2). -.PP -A terminal associated with one of these files ordinarily -operates in full-duplex mode. -Characters may be typed at any time, -even while output is occurring, and are only lost when the -system's character input buffers become completely -choked, which is rare, -or when the user has accumulated the maximum allowed number of -input characters that have not yet been read by some program. -Currently this limit is 256 characters. -When the input limit is reached all the -saved characters are thrown away without notice. -.PP -Normally, terminal input is processed in units of lines. -This means that a program attempting -to read will be suspended until an entire line has been -typed. -Also, no matter how many characters are requested -in the read call, at most one line will be returned. -It is not however necessary to read a whole line at -once; any number of characters may be -requested in a read, even one, without losing information. -There are special modes, discussed below, -that permit the program to read each character as typed -without waiting for a full line. -.PP -During input, erase and kill processing is normally -done. -By default, the character `#' erases the -last character typed, except that it will not erase -beyond the beginning of a line or an EOT. -By default, the character `@' kills the entire -line up to the point where it was typed, but not beyond an EOT. -Both these -characters operate on a keystroke basis independently -of any backspacing or tabbing that may have been done. -Either `@' or `#' may be entered literally by preceding -it by `\\'; -the erase or kill character remains, but the -`\\' disappears. -These two characters may be changed to others. -.PP -When desired, -all upper-case letters are mapped into -the corresponding lower-case letter. -The upper-case letter may be generated by preceding -it by `\\'. -In addition, the following escape sequences can be generated -on output and accepted on input: -.PP -.nf -for use -\` \e\' -| \\! -~ \e^ -{ \e( -} \e) -.fi -.PP -Certain ASCII control characters have special meaning. -These characters are not passed to a reading program -except in raw mode where they lose their special character. -Also, it is possible to change these characters from the default; -see below. -.TP -EOT -(Control-D) may be used to generate an end of file -from a terminal. -When an EOT is received, all the characters -waiting to be read are immediately passed to -the program, without waiting for a new-line, -and the EOT is discarded. -Thus if there are no characters waiting, which -is to say the EOT occurred at the beginning of a line, -zero characters will be passed back, and this is -the standard end-of-file indication. -.TP -DEL -(Rubout) -is not passed to a program but generates -an -.I interrupt -signal -which is sent to all processes with the associated control terminal. -Normally each such process is forced to terminate, -but arrangements may be made either to -ignore the signal or to receive a -trap to an agreed-upon location. -See -.IR signal (2). -.TP -FS -(Control-\\ or control-shift-L) -generates the -.I quit -signal. -Its treatment is identical to the interrupt signal -except that unless a receiving process has -made other arrangements it will not only be terminated -but a core image file will be generated. -.TP -DC3 -(Control-S) delays all printing on the terminal -until something is typed in. -.TP -DC1 -(Control-Q) restarts printing after DC3 without generating -any input to a program. -.PP -When the carrier signal from the dataset drops (usually -because the user has hung up his terminal) -a -.I hangup -signal is sent to all processes with the terminal -as control terminal. -Unless other arrangements have been made, -this signal causes the processes to terminate. -If the hangup signal is ignored, any read -returns with an end-of-file indication. -Thus programs that read a terminal and test for -end-of-file on their input -can terminate appropriately when -hung up on. -.PP -When one or more -characters are written, they are actually transmitted -to the terminal as soon as previously-written characters -have finished typing. -Input characters are echoed by putting them in the output queue -as they arrive. -When a process produces characters more rapidly than they can be typed, -it will be suspended when its output queue exceeds some limit. -When the queue has drained down to some threshold -the program is resumed. -Even parity is always generated on output. -The EOT character is not transmitted -(except in raw mode) -to prevent terminals -that respond to it from hanging up. -.PP -Several -.IR ioctl (2) -calls apply to terminals. -Most of them use the following structure, -defined in -.IR : -.PP -.nf -.ft 3 -struct sgttyb { - char sg_ispeed; - char sg_ospeed; - char sg_erase; - char sg_kill; - int sg_flags; -}; -.ft R -.fi -.PP -The -.I sg_ispeed -and -.I sg_ospeed -fields describe the input and output speeds of the -device according to the following table, -which corresponds to the DEC DH-11 interface. -If other hardware is used, -impossible speed changes are ignored. -Symbolic values in the table are as defined in -.IR . -.PP -.nf -.ta \w'B9600 'u +5n -B0 0 (hang up dataphone) -B50 1 50 baud -B75 2 75 baud -B110 3 110 baud -B134 4 134.5 baud -B150 5 150 baud -B200 6 200 baud -B300 7 300 baud -B600 8 600 baud -B1200 9 1200 baud -B1800 10 1800 baud -B2400 11 2400 baud -B4800 12 4800 baud -B9600 13 9600 baud -EXTA 14 External A -EXTB 15 External B -.fi -.DT -.PP -In the current configuration, -only 110, 150, 300 and 1200 baud are really supported on dial-up lines. -Code conversion and line control required for -IBM 2741's (134.5 baud) -must be implemented by the user's -program. -The half-duplex line discipline -required for the 202 dataset (1200 baud) -is not supplied; full-duplex 212 datasets work fine. -.PP -The -.I sg_erase -and -.I sg_kill -fields of the argument structure -specify the erase and kill characters respectively. -(Defaults are # and @.) -.PP -The -.I sg_flags -field of the argument structure -contains several bits that determine the -system's treatment of the terminal: -.PP -.ta \w'ALLDELAY 'u +\w'0100000 'u -.nf -ALLDELAY 0177400 Delay algorithm selection -BSDELAY 0100000 Select backspace delays (not implemented): -BS0 0 -BS1 0100000 -VTDELAY 0040000 Select form-feed and vertical-tab delays: -FF0 0 -FF1 0100000 -CRDELAY 0030000 Select carriage-return delays: -CR0 0 -CR1 0010000 -CR2 0020000 -CR3 0030000 -TBDELAY 0006000 Select tab delays: -TAB0 0 -TAB1 0001000 -TAB2 0004000 -XTABS 0006000 -NLDELAY 0001400 Select new-line delays: -NL0 0 -NL1 0000400 -NL2 0001000 -NL3 0001400 -EVENP 0000200 Even parity allowed on input (most terminals) -ODDP 0000100 Odd parity allowed on input -RAW 0000040 Raw mode: wake up on all characters, 8-bit interface -CRMOD 0000020 Map CR into LF; echo LF or CR as CR-LF -ECHO 0000010 Echo (full duplex) -LCASE 0000004 Map upper case to lower on input -CBREAK 0000002 Return each character as soon as typed -TANDEM 0000001 Automatic flow control -.DT -.fi -.PP -The delay bits specify how long -transmission stops to allow for mechanical or other movement -when certain characters are sent to the terminal. -In all cases a value of 0 indicates no delay. -.PP -Backspace delays are currently ignored but might -be used for Terminet 300's. -.PP -If a form-feed/vertical tab delay is specified, -it lasts for about 2 seconds. -.PP -Carriage-return delay type 1 lasts about .08 seconds -and is suitable for the Terminet 300. -Delay type 2 lasts about .16 seconds and is suitable -for the VT05 and the TI 700. -Delay type 3 is unimplemented and is 0. -.PP -New-line delay type 1 is dependent on the current column -and is tuned for Teletype model 37's. -Type 2 is useful for the VT05 and is about .10 seconds. -Type 3 is unimplemented and is 0. -.PP -Tab delay type 1 is dependent on the amount of movement -and is tuned to the Teletype model -37. -Type 3, called XTABS, -is not a delay at all but causes tabs to be replaced -by the appropriate number of spaces on output. -.PP -Characters with the wrong parity, as determined by bits 200 and -100, are ignored. -.PP -In raw mode, every character is passed immediately -to the program without waiting until a full line has been typed. -No erase or kill processing is done; -the end-of-file indicator (EOT), the interrupt character -(DEL) and the quit character (FS) are not treated specially. -There are no delays and no echoing, and no replacement of -one character for another; -characters are a full 8 bits for both input and output -(parity is up to the program). -.PP -Mode 020 causes input carriage returns to be turned into -new-lines; -input of either CR or LF causes LF-CR both to -be echoed -(for terminals with a new-line function). -.PP -CBREAK is a sort of half-cooked (rare?) mode. -Programs can read each character as soon as typed, instead -of waiting for a full line, -but quit and interrupt work, and output delays, case-translation, -CRMOD, XTABS, ECHO, and parity work normally. -On the other hand there is no erase or kill, -and no special treatment of \e or EOT. -.PP -TANDEM mode causes the system to produce -a stop character (default DC3) whenever the input -queue is in danger of overflowing, and a start character -(default DC1) -when the input queue has drained sufficiently. -It is useful for flow control when the `terminal' -is actually another machine that obeys the conventions. -.PP -Several -.I ioctl -calls have the form: -.PP -.B #include -.PP -.B ioctl(fildes, code, arg) -.br -.B struct sgttyb *arg; -.PP -The applicable codes are: -.TP -TIOCGETP -Fetch the parameters associated with the terminal, and store -in the pointed-to structure. -.TP -TIOCSETP -Set the parameters according to the pointed-to structure. -The interface delays until output is quiescent, -then throws away any unread characters, -before changing the modes. -.TP -TIOCSETN -Set the parameters but do not delay or flush input. -Switching out of RAW or CBREAK mode -may cause some garbage input. -.PP -With the following codes the -.I arg -is ignored. -.TP -TIOCEXCL -Set ``exclusive-use'' mode: -no further opens are permitted until the file has been closed. -.TP -TIOCNXCL -Turn off ``exclusive-use'' mode. -.TP -TIOCHPCL -When the file is closed for the last time, -hang up the terminal. -This is useful when the line is associated -with an ACU used to place outgoing calls. -.TP -TIOCFLUSH -All characters waiting in input or output queues are flushed. -.PP -The following codes affect characters that are special -to the terminal interface. -The argument is a pointer to the following structure, -defined in -.IR : -.PP -.nf -.ft 3 -struct tchars { - char t_intrc; /* interrupt */ - char t_quitc; /* quit */ - char t_startc; /* start output */ - char t_stopc; /* stop output */ - char t_eofc; /* end-of-file */ - char t_brkc; /* input delimiter (like nl) */ -}; -.fi -.ft R -.PP -The default values for these characters are -DEL, FS, DC1, DC3, EOT, and \-1. -A character value of \-1 -eliminates the effect of that character. -The -.I t_brkc -character, by default \-1, -acts like a new-line in that it terminates a `line,' -is echoed, and is passed to the program. -The `stop' and `start' characters may be the same, -to produce a toggle effect. -It is probably counterproductive to make -other special characters (including erase an kill) -identical. -.PP -The calls are: -.TP -TIOCSETC -Change the various special characters to those given in the structure. -.TP -TIOCSETP -Set the special characters to those given in the structure. -.SH FILES -/dev/tty -.br -/dev/tty* -.br -/dev/console -.SH SEE ALSO -getty(8), stty (1), signal(2), ioctl(2) -.SH BUGS -Half-duplex terminals are not supported. -.PP -The terminal handler has clearly entered the -race for ever-greater complexity and generality. -It's still not complex and general enough for -TENEX fans. //GO.SYSIN DD tty.4 echo vp.4 sed 's/.//' >vp.4 <<'//GO.SYSIN DD vp.4' -.TH VP 4 -.SH NAME -vp \- Versatec printer-plotter -.SH DESCRIPTION -.I Vp0 -is the interface to a Versatec D1200A printer-plotter -with a Versatec C-PDP11(DMA) controller. -Ordinarily bytes written on it are interpreted as ASCII characters -and printed. -As a printer, it writes 64 lines of 132 characters each on -11 by 8.5 inch paper. -Only some of the ASCII control characters are interpreted. -.TP -NL -performs the usual new-line function, i.e. -spaces up the paper and resets to the left margin. -It is ignored however following a CR which ends a non-empty line. -.TP -CR -is ignored if the current line is empty but is otherwise -like NL. -.TP -FF -resets to the left margin and then to the top of the next page. -.TP -EOT -resets to the left margin, advances 8 inches, and then performs a FF. -.PP -The -.IR ioctl (2) -system call may be used to change the mode of the device. -Only the first word of the 3-word argument structure is used. -The bits mean: -.TP -0400 -Enter simultaneous print/plot mode. -.br -.ns -.TP -0200 -Enter plot mode. -.br -.ns -.TP -0100 -Enter print mode (default on open). -.br -.ns -.TP -040 -Send remote terminate. -.br -.ns -.TP -020 -Send remote form-feed. -.br -.ns -.TP -010 -Send remote EOT. -.br -.ns -.TP -04 -Send remote clear. -.br -.ns -.TP -02 -Send remote reset. -.PP -On open a reset, clear, and form-feed are performed automatically. -Notice that the mode bits are not encoded, so that it is required -that exactly one be set. -.PP -In plot mode each byte is interpreted as 8 bits -of which the high-order is plotted to the left; -a `1' leaves a visible dot. -A full line of dots is produced by 264 bytes; -lines are terminated only by count or by a remote terminate function. -There are 200 dots per inch both vertically and horizontally. -.PP -When simultaneous print-plot mode is entered -exactly one line of characters, terminated by NL, CR, or -the remote terminate function, -should be written. -Then the device enters plot mode and -at least 20 lines of plotting bytes should be sent. -As the line of characters (which is 20 dots high) -is printed, the plotting bytes overlay the characters. -Notice that it is impossible to print characters on baselines -that differ by fewer than 20 dot-lines. -.PP -In print mode lines may be terminated either with -an appropriate ASCII character or by using the remote -terminate function. -.SH FILES -/dev/vp0 -.SH "SEE ALSO" -opr(1) //GO.SYSIN DD vp.4