Path: utzoo!utgpu!watserv1!watmath!att!att!emory!wuarchive!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Unix and C Message-ID: <14376@smoke.brl.mil> Date: 7 Nov 90 11:01:53 GMT References: Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 15 In article richb@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.