Path: utzoo!mnetor!uunet!husc6!think!bloom-beacon!oberon!skat.usc.edu!blarson From: blarson@skat.usc.edu (Bob Larson) Newsgroups: comp.lang.misc Subject: Re: HLLs vs asm (was Re: portable "asm") Message-ID: <7924@oberon.USC.EDU> Date: 28 Mar 88 20:02:10 GMT References: <11702@brl-adm.ARPA> <243@eagle_snax.UUCP> <1988Mar27.002601.17038@utzoo.uucp> Sender: news@oberon.USC.EDU Reply-To: blarson@skat.usc.edu (Bob Larson) Organization: USC AIS, Los Angeles Lines: 53 In article <1988Mar27.002601.17038@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >> > plus it allows access to the "bare >> >metal", etc.) >> Are we talking about the same language? >Probably. One of C's strengths -- and a major reason for its popularity -- >is that it *does* let you get at much of the underlying machine if you >really want to *and* understand your implementation in detail. AND your machine happens to match C fairly well AND your implimentation does a straitforward mapping. > It's not >enough to understand C and the machine, you have to understand the mapping >between them that the compiler provides. But once you do, you can use C >to do most of the things an assembler can do. This can be said of most high level languages. > C insists on managing the stack and some of the registers itself, ?some? Are you implying that there are C implementations that use the register keyword for anything other than a promise not to take the address? :-) > places constraints on what you >you can do to the PC, and won't generate funny instructions for you, Does this include the funny instructions added for use by the C compiler? :-) (Prime expended their 32i mode instruction set into 32ix mode mainly for use by the C compiler.) > but >these limitations often aren't a problem. Otherwise it opens the machine >up pretty thoroughly, *if* you know what you're doing. C opens up an idea of what a machine could look like. Not all machines look like that. Some machines have basic concepts difficult or impossible to express in C. (Such as a dec 10/20 "byte pointer" [variable size bytes]) C is a high level language that closely models some common architectures. It is a mistake to think it can be used for "access to the 'bare metal'" without specifying what 'bare metal' you are thinking of. (Not all the world is a vax or pdp11 or 68k or spark.) -- Bob Larson Arpa: Blarson@Ecla.Usc.Edu blarson@skat.usc.edu Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson Prime mailing list: info-prime-request%fns1@ecla.usc.edu oberon!fns1!info-prime-request