Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!think.com!paperboy!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.sys.apple2 Subject: Re: HLLs vs. Assembly Message-ID: <15644@smoke.brl.mil> Date: 30 Mar 91 15:12:35 GMT References: <1991Mar28.012635.14869@nntp-server.caltech.edu> <13156@ucrmath.ucr.edu> <1991Mar30.080418.16299@ee.ualberta.ca> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 25 In article <1991Mar30.080418.16299@ee.ualberta.ca> jpenne@ee.ualberta.ca (Jerry Penner) writes: >Portability. It makes a lot more economic sense to write in a more >portable language than in assembly. I think this is the most >important reason OS writers use C. I think that's an argument for UNIX, but not in general. Texas Instruments, for example, wrote at least some of their OSes in an extended version of Pascal; Burroughs wrote theirs in ESPOL, which resembled Extended Algol; and DEC wrote VAX/VMS mainly in Bliss, which is very analogous to C although different in detail. In all these cases (UNIX also), an important consideration was that it is simply easier to do a good job using a structured high-level language. The fact that there was negligible impact on performance was of course crucial. >I agree that using assembly is probably easier to write an OS in, >because you don't have to fight the HLLs tendencies to constrict >you into doing something in a certain way. C was specifically designed to allow a high degree of exploitation of the system architecture from within a structured high-level language. There are a few things that normally HAVE to be done in assembly language, such as the glue between trap vectors and the C code that processes the interrupts, but these are relatively few and easily isolated.