[TUHS] Re: Porting Unix v6 to i386

John Holden johnh at psych.usyd.edu.au
Thu Jan 31 07:52:41 AEST 2002


I think that v7 would be far easier to port than v6. Although it's not much
bigger than v6, the code is a lot cleaner, and there are less machine
dependencies.  One of the reasons for a lot of the changes between v6 and v7
was a conscious effort to make it more portable . The old assignment operators
like '=+' changed to "+=".  'Unsigned' and 'long' data types are missing
from v6 (and reflected in the kernel), so all integer calculations were 16
bits. Unsigned ops were done using 'char *'. v7 was ported to the Vax and the
Interdata.

ioctl is there, and the 'standard io' library. The file seek call in v6 had
either block (512) or byte offsets, and v7 introduced lseek to replace it. Only
16 bits were used to store block numbers in inodes, so filesystem sizes were
restricted (not a real problem since both v6 and v7 could run happily on a 2.5Mb
RK05 disk, including swap space and c compiler). 'vi' ran under v7, but v6 only
offered 'ed' (or variants like 'em') and 'qed'

If you hadn't guessed, v7 is by far my favourite Unix variant. Lean, clean and
without the latter clutter of supporting networking in the kernel.




More information about the TUHS mailing list