[COFF] [TUHS] Re: Hypothetical: Could MULTICS have been written in C, if available?

Noel Chiappa via COFF coff at tuhs.org
Wed May 27 20:49:42 AEST 2026


    > From: Larry McVoy

    > From BitKeeper's libc/style.h 
    > ...
    > typedef signed char             i8;
    > typedef signed short            i16;
    > typedef signed int              i32;
    > typedef signed long long        i64;

As I've mentioned before, I did something similar for portable networking
code we wrote at MIT; our types were all 'xxxy', where 'xxx' were the
semantics (signed integer, unsigned integer, none, etc) and 'y' was the size
- but richer than the above list: in addition to 8,16,32 (used for giving
packet formats) we also had 'f' (at least 16 bits, but whatever was fastest
on the architecture/compiler at hand - 16 bits on the early MC68000's); 'w'
(the word lenth - address size - of the machine); etc.

The resultant code was wonderfully portable; I once, on a bet, managed to
move our portable real-time OS (written with these declarations) to a new
machine (the AMD 29000) literally overnight; I pulled an all-nighter, and
it was runing when people got there the next morning.

    > those have worked for the last 27 years on pretty much every platform,

In that later era, OK. They would not have worked in mine; on a PDP-11, an
'int' was 16 bits. (I wonder how long an 'int' is on modern 64-bit
architectures? They probably had to keep it at 32 bits, or it would have
broken too much code - or was it defined to always be 32 bits in later C
specs?)

	Noel


More information about the COFF mailing list