Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: Good programmers and assembly language (very long) Message-ID: Date: 5 Apr 91 18:47:16 GMT References: <7214@harrier.ukc.ac.uk> <2220@pdxgate.UUCP> Organization: Not an Organization Lines: 129 In article <2220@pdxgate.UUCP> bairds@eecs.cs.pdx.edu (Shawn L. Baird) writes: >mr3@ukc.ac.uk (M.Rizzo) writes: > >Writing in assembler in Unix is a sin? Gee boss, parts of the OS are >written in assembler, guess we'd better junk it! Just how did a >seperate convention for 68000 assembly come about, if nobody ever uses >assembly with Unix? Assembly is used in commerical Unix products that >need the extra speed it offers. About the only reason public domain >products don't use it is it's inherent unportability. Why does Sun >try to remain binary compatible through most of their line? Because, >some of the stuff can't just be ported and recompiled on a new machine. Most people do not use assembly with UNIX... OBVIOUSLY the OS needs *some* assembly, but in fact *most* device drivers are written entirely in C, including the interrupt handler (with only a tag in assembly). Even the serial interrupt handler is usually done in C, though not always. The reasons are obvious.. you have a tiny market writing a program that only works on one type of UNIX box. It grows a hundred times larger if you write the code in a portable manner (C or some other high level language). These reasons have nothing to do with programming on the amiga specifically. >Here's a small list of things that I can come up with that require >knowledge of assembly: writing an OS, writing device drivers, writing >_fast_ programs (for instance, Sculpt-3D had to be fast. They didn't OS yes device drivers no (but obviously need some know. of hardware) fast programs no >use the best algorithms in the world, however, so it should have been >faster), writing compilers (yeah, those things you use in preference >to assembly). Inherently, anthing that needs to be either low level, compilers - yes (in knowledge), assuming you don't generate intermediate output code and run it through sombody's (GNUs) code generator. >or fast. Did you notice how most colleges require some sort of >course like Computer Organization? (a class dedicated to familiarizing >computer science majors with what makes the hardware tick) Do you >suppose they have this class just to irk you? But not for the purpose of assembly programming, rather, those classes are designed to give the student some insite into how the machine works. I'm not sure what your point is here. >Not to mention whether or not AT&T has licensed my message yet. >Assembler sure as hell doesn't hurt a programmer, and remaining >ignorant of other methods or writing applications is never a good >thing. I, myself, have exposed myself to a variety of languages. >None of them have made me into a "good" programmer, but I feel that >all of them have made me a "better" programmer. It works both ways (the first statement). I agree with (the second statement). >Assembler seperates the knowledgable from the ignorant. If that means >the men from the boys, then yes. Anyone who intends to never learn >assembly is just perpetuating his/her own ignorance. That isn't true at all, you can turn the argument around just as easily... i.e. that high level language knowledge separates the knowledgable from the ignorant. Wrong both ways... the real answer is: (1) experience in (2) algorithms you have devised or learned relating to (3) broad area of learning (e.g. broad knowledge base). >Re-inventing the wheel is an important concept in learning anything. I >would say that one of the things that makes a good programmer is >education, and refusing to learn is certainly a sign of a lack of >education. I know programmers who don't want to sulley themselves with >the dirt of programming in assembly language. These are the same >people who have no desire to learn anything about the hardware they use, >and no desire to try new (or old but as yet unlearned) ways of doing >things. I suppose that's true in a general sense, but you are equating knowledge as REQUIRING to know assembly. Considering that assembly is only a very SMALL part of the industry I do not see how you can equivicate it as you have. >I guess that one experience wasn't enough to show you that 8086 & 6809 >assembly is hardly worth considering as assembly. For a real laugh, >try assembly on a PDP-11. Do you *know* PDP-11 assembly? The VAX instruction set was loosly based on the PDP-11 (even has a compatibility mode in 780's) and the 680x0 instruction set was based on the VAX. >>>If not, get a clue. You can abuse any language, including assembler. > >>Abuse? What do you mean? > >Anyone who can write in assembly and who is proficient in C or some >mid to high level language can write clear and accurate assembly. >Abuse of assembly can occur just like abuse of a higher level >language. It can also be damn near as elegant. Uh, no... not true at all. I know people who know a number of languages, including several assembly languages, and their coding is about the worst I've seen. >Exactly my feelings on the matter. Assembly language is worth knowing, >without a doubt. You aren't a REAL programmer until you've learned >it. Assembler is a critical language. If you don't learn assembler, >you're missing out on the only way to do some programs. (Such as OS >programming) Personally, I agree that assembly language is worth knowing, and using. However, your statement insinuating that assembly is required to be a REAL programmer is extremely biased and incorrect, and shows a lack of perspective. > Shawn L. Baird, bairds@eecs.ee.pdx.edu, Wraith on DikuMUD > The above message is not licensed by AT&T, or at least, not yet. -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA