Link to the article about the AT&T UNIX OS and C ....<br><br><br><a href="http://en.wikipedia.org/wiki/UNIX">http://en.wikipedia.org/wiki/UNIX</a><br><br><br><div class="gmail_quote">On Fri, Dec 5, 2008 at 8:01 PM, Prince Riley <span dir="ltr"><<a href="mailto:wmarketing3@gmail.com">wmarketing3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Here is a direct reference from the Wikipedia article I referenced in my prior post ...<br><br>
In 1973, Unix was rewritten in the <a href="http://en.wikipedia.org/wiki/C_%28programming_language%29" title="C (programming language)" target="_blank">C programming language</a>,
contrary to the general notion at the time "that something as complex
as an operating system, which must deal with time-critical events, had
to be written exclusively in assembly language".<sup><a href="http://en.wikipedia.org/wiki/UNIX#cite_note-Stallings-3" title="" target="_blank"><span>[</span>4<span>]</span></a></sup> The migration from <a href="http://en.wikipedia.org/wiki/Assembly_Language" title="Assembly Language" target="_blank">assembly language</a> to the <a href="http://en.wikipedia.org/wiki/High-level_programming_language" title="High-level programming language" target="_blank">higher-level language</a> C resulted in much more <a href="http://en.wikipedia.org/wiki/Software_quality#Portability" title="Software quality" target="_blank">portable</a> software, requiring only a relatively small amount of machine-dependent code to be replaced when porting Unix to other <a href="http://en.wikipedia.org/wiki/Platform_%28computing%29" title="Platform (computing)" target="_blank">computing platforms</a>.<br>
<font color="#888888">
<br>Prince</font><div><div></div><div class="Wj3C7c"><br><br><br><div class="gmail_quote">On Fri, Dec 5, 2008 at 7:57 PM, Prince Riley <span dir="ltr"><<a href="mailto:wmarketing3@gmail.com" target="_blank">wmarketing3@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello<br><br>I don't mean to start a culture war here, but I think there is a bit of overstatement in this post that 'C' is somehow a better language for writing an OS in than say Pascal or OP or anything else. <br>
<br>In point of fact, the only 'best' language for any processor is its own machine code which is always binary.<br>And the first operating system software written was done so in the assembly language which is written to use mnemoics <br>
that when 'assembled' convert directly into the binary machine language on a one to one basis. <br><br>Now EVERY compiled language, including C, must be processed from its syntactical representation into assembly language or machine code. In fact, if you download the GCC complier source code and read it, you'll see almost immediately that it actually a 'language' front-end connected to a 'assembler machine code' back end. <br>
<br>When the 'C' language was designed at AT&T it used 'assembler' like constructs and syntax because it's author wanted <br>to stop writing programs in a language called BCPL.. <br><br>So aside from a 'historical accident' that the first AT&T OS ..UNIX.. was being written at the same time C was being developed, there is no other reason for any program, including an OS, to be written in C. To suggest that C is better is rather like suggesting that Spanish is a better language than English for writing a novel. <br>
<br>That said, if someone wished to write a modern OS in FP, which has nearly every programming construct that 'C' has (ints, doubles, floats, bytes, and bits) and you were willing to put in the time to fine tune and modify the FP compiler, you could produce a OS in FP that would be every bit as effective and perform as well or better as one written in C. And as far as the processor running the OS couldn't tell what language the OS was written in. <br>
<br>If anyone wants to convince themselves on this its simple, you'll find Ritchie (the creator of the C language) explained these points in the preface to his first book on C. There is also a brief mention of this in the Wikipedia article on the UNIX operating system. (see the article footnotes)<br>
<font color="#888888">
<br>Prince <br></font><div><div></div><div><br><br><div class="gmail_quote">On Fri, Dec 5, 2008 at 6:59 PM, Guillermo Martínez Jiménez <span dir="ltr"><<a href="mailto:gmjimen@burdjia.com" target="_blank">gmjimen@burdjia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Are you sure?<br>
<br>
Yes, I am.<br>
<div><br>
> doesn't older MacOS's versions where written in Object Pascal?<br>
<br>
</div>Yes, it does, but as I said I think it wasn't the better options.<br>
<div><br>
> I think the problem here (again) is not the language, it's the critical mass of users of the language. Using C for Linux was a good bet, not because the language is good (Pascal is way better for me), but because C has a wider user base who can fix/add features.<br>
<br>
</div>I disagree. C is better for write operating systems *by definition*:<br>
C was created to write UNIX, Pascal was created to learn good<br>
programming techniques. C is low/mid-level language, Pascal is<br>
high-level (and Object Pascal is even higher): OS are the lowest<br>
software level.<br>
<br>
I'm not saying it's impossible: here you have MacOS and Toro. I'm<br>
just saying that _I think_ it isn't the best option. Of course a<br>
better option is to write the kernel in C and Assembler and the<br>
utilities in Pascal and Object Pascal.<br>
<br>
Guillermo "Ñuño" Martínez<br>
<div><div></div><div>_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>