Xref: utzoo comp.unix.questions:31610 comp.lang.c:39544 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.unix.questions,comp.lang.c Subject: Re: Need Assembly lang. to learn C? Message-ID: <1991May24.105947.3379@thunder.mcrcim.mcgill.edu> Date: 24 May 91 10:59:47 GMT References: <1991May21.175914.3681@rodan.acs.syr.edu> Followup-To: comp.lang.c Organization: McGill Research Centre for Intelligent Machines Lines: 47 In article <1991May21.175914.3681@rodan.acs.syr.edu>, ldstern@rodan.acs.syr.edu (Larry Stern) writes: > To all: a local instructor, who teaches C, has told several of us who > are interested in his course that we should take an Assembly language > course first. Even though his course is C in the DOS environment and > a knowledge of 8088/80286 would no doubt be useful, we are wondering > if this is really necessary. This really belongs in comp.lang.c, not in comp.unix.questions. I'm cross-posting and redirecting followups. It depends on what you want. It is entirely possible to learn C, and probably even become proficient at it, without knowing any assembly language at all. It is also true that you will probably be a better programmer in general, and C programmer in particular, if you know several languages, including assembly languages. Note the plural: knowing only one assembly language will tend to give you a biased view of the world, making you cast every machine into the familiar mold. This is dangerous in general and particularly dangerous in C; it leads to the all-the-world's-a-VAX syndrome (or a 8086, or whatever machine it is you know). That is, unless you exercise great care to avoid it, you will find yourself writing code that assumes things that are true on the machine you're familiar with, but which are not true in general. Like the questions one sometimes sees on the net saying things like "this program works on my pc at home but not on the machines here at school, what's wrong?" when what's wrong is that some assumption has been made that's true on the PC but not on the school's machine. For example, perhaps the person assumed that ints were always 16 bits wide, or that they're stored little-endian. The best cure for this is probably to work with multiple machines, preferably as widely disparate as possible. Knowing each machine at the assembly level will help you work on that machine, and if you do this for all of them you will hopefully be able to shake off the tendency to make invalid assumptions in your code. So I would say that unless the course is specifically teaching using C to write machine-specific code on the 8086 family, it is not necessary. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu