Z80 und Unix


Written by Douglas Braun


UZI is an implementation of the Unix kernel written for a Z-80 based computer. It implements almost all of the functionality of the 7th Edition Unix kernel. UZI was written to run on one specific collection of custom-built hardware, but since it can easily have device drivers added to it, and it does not use any memory management hardware, it should be possible to port it to numerous computers that current use the CP/M operating system. The source code is written mostly in C, and was compiled with The Code Works' Q/C compiler. UZI's code was written from scratch, and contains no AT&T code, so it is not subject to any of AT&T's copyright or licensing restrictions. Numerous 7th Edition programs have been ported to UZI with little or no difficulty, including the complete Bourne shell, ed, sed, dc, cpp, etc.

How it works:

Since there is no standard memory management hardware on 8080-family computers, UZI uses /"total swapping" to achieve multiprocessing. This has two implications: First, UZI requires a reasonably fast hard disk. Second, there is no point in running a different process while a process is waiting for disk I/O. This simplifies the design of the block device drivers, since they do not have to be interrupt-based. UZI itself occupies the upper 32K of memory, and the currently running process occupies the lower 32K. Since UZI currently barely fits in 32K, a full 64K of RAM is necessary. UZI does need some additional hardware support. First, there must be some sort of clock or timer that can provide a periodic interrupt. Also, the current implementation uses an additional real-time clock to get the time for file timestamps, etc. The current TTY driver assumes an interrupt-driven keyboard, which should exist on most systems. The distribution contains code for hard and floppy disk drivers, but since these were written for custom hardware, they are provided only as templates to write new ones.

How UZI is different than real Unix:

UZI implements almost all of the 7th Edition functionality. All file I/O, directories, mountable file systems, user and group IDs, pipes, and applicable device I/O are supported. Process control (fork(), execve(), signal(), kill(), pause(), alarm(), and wait()) are fully supported. The number of processes is limited only by the swap space available. As mentioned above, UZI implements Unix well enough to run the Bourne shell in its full functionality. The only changes made to the shell's source code were to satisfy the limitations of the C compiler.

>> weiter