Skip to content

Latest commit

 

History

History

sys

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Install new tty driver & device interfaces

This version of tty.c came from a distribution from the University of Nijmegen.

Summary of changes

The original tty driver for V7 used three character queues: one for output, and two for input. Characters from the devices were placed on an input queue and processed to the 'canonical' queue when the user pressed return. When return was entered, the canonical queue was passed into user space processing all the delete characters and other editing characters. The new code uses a single input queue, and the characters used to modify the input data operate directly on the queue. There is a new routine zapc that removes characters from the end of the queue to assist with the editing.

The change meant that the tty structure in tty.h was changed significantly. I've also moved all the special character definitions into deftty.h to allow other programs to get at the values. The change also removes support for the Packet Driver and multiplexer which are controlled by defines in tty.h.

As well as tty.c essentially being replaced, the drivers that use it need slight alterations.

Files

  • dc.c: DC11 driver code. Small change to support the full range of ioctl commands.
  • deftty.h: new file with control characters and modes abstracted from tty.h.
  • dh.c: DH11 driver, changes for initial terminal setup, and support for paging.
  • kl.c: KL11/DL11 driver.
  • dz.c: A reworked driver from the Nijmegen distribution.
  • pk.p: The old code uses one of the terminal queues and clears the other. Now only one queue exists, and the code clears it and then uses it.
  • sgtty.h: This header file contains public versions of the various tty setting values, it needs revision for the new tty.c.
  • tty.c: New terminal driver.
  • tty.h: New header file.

Original V7 files can be found in the orig directory.

Installation

These scripts all need an argument which is the destination in the filesystem you are changing. This is to stop running a script without intent and then wondering how to get back to where you were. You'll get the same error message for each script that is called with no argument, or the target directory cannot be opened.

Before you start this, I do recommend that you stop the simulator and take a copy of the rp06-0.disk.

You will need to run these scripts as root. They must to be run from this directory changing files in /usr/sys or anywhere else. They are all as defensive as possible and can be run more than once.

  • step1.sh provides backup files in various orig directories. It creates directories called orig in the various directories that contain files that will be overwritten or removed. Files in any orig directory are not overwritten. The script needs the /bin/[ command, and tests for it (see sh-test).

  • step2.sh installs new files in the various system directories, files are not overwritten unless a backup exists in an orig directory.

  • step3.sh is a verification step comparing the files in this directory with the versions in the destination tree.

You can now rebuild your new kernel. Scripts to assist with this can be found on ../../v7conf. Make sure you keep a copy of your running kernel so you can revert in case of problems.