Unix and C

The Wiz ted at oz.plymouth.edu
Tue Nov 20 14:09:06 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 ?

	Have you ever heard of cross compilation?  This is where a compiler
on another machine is directed (out of lack for a better word) to produce
machine "object" code for another machine.  I think you are confused about
the difference between assembly lang. and machine language.  Most good
books on Operating systems Explain how it is done, you might want to look
at one.  How long do you think it would to take to write a large 
operating system in machine code?  Hint: A long time.  Unix is based
on the idea that when you port it to a new machine you only need to re-write
the kernel (The lowest level) of the OS,  thus making it easily portable.

				--> Ted



More information about the Comp.lang.c mailing list