Unix and C

Doug Gwyn gwyn at smoke.brl.mil
Wed Nov 7 22:01:53 AEST 1990


In article <LDB1R3w163w at railnet.UUCP> richb at railnet.UUCP (Richard Banks) writes:
>How can Unix be written in C ? I thought all OS`s had to be written
>in assembly language, else they'd have the same interrupts as the
>OS you booted your complier language under to write the program ?

Well, you must have thought wrong...

Seriously, the difference is that between a "hosted" and a "freestanding"
environment, using terminology from the C standard.  Certainly the UNIX
kernel does not expect to simply invoke fseek() and have an underlying
operating system take care of the details.  The details must be programmed
step by step in the UNIX kernel implementation itself.  There are a number
of readily available books that explain how operating systems can be
implemented; there is nothing to prevent the vast majority of such an
implementation from being coded in C.



More information about the Comp.lang.c mailing list