Assembly or ....ok

Eric Green elg at killer.DALLAS.TX.US
Thu Dec 1 14:20:41 AEST 1988


in article <11915 at cup.portal.com>, Drool at cup.portal.com (Paul James Coene) says:
> In article <1961 at crete.cs.glasgow.ac.uk> orr at cs.glasgow.ac.uk
> (Fraser Orr) writes:
>>In article <729 at convex.UUCP> dodson at mozart.UUCP (Dave Dodson) writes:
>>>I believe it is important to learn assembly language for some computer
>>>because that is how you learn how computers _really_ work.  This knowledge
>>>can help you program better in any language.
> even explaining pointers is tough when the basics gained
> from exposure to assembler is lacking.  I certainly don't profess to be an
> assembler wizard, but having some basics behind me has been invaluable.

Ah yes, time to trot out one of my standards, once again (usually,
it's on comp.edu, but...). Anyhow, I'll have to agree about the
pointers/assembly language correlation.  What I seem to have found,
among those I know who don't know the difference between "Vax" and
"Unix", is that they view pointers as "magic" things that damnedably
difficult to use because they do "weird" things. Whereas anybody with
assembly language under their belt knows darn well that a pointer is
just an address, and that you can follow them by dereferencing ("you
mean it's just like loading it into R0 and doing indirect? GEE!").

I have long advocated that programmers need to know more than how to
feed Pascal and "C" to a "black box" that spits out answers, to the
extent of saying that 1st year CS majors should take digital logic and
microprocessors as a corequisite to the usual "bang Pascal into the
computer" introductory course. If you don't know the contents of that
"black box", if you don't know HOW it spits out those answers, a) your
sense of curiousity is seriously lacking, and b) don't be surprised if
you're lost when your "black box" suddenly starts spitting out wrong
answers.

As for me, personally: I avoid using assembly language like the
plague. I've had to write large assembly-language programs for 8-bit
microcomputers, and liken it to getting teeth drilled insofar as
enjoyment goes. Now that I'm programming a 68000-based machine, I'm
glad I don't need to go all the way to assembler. BUT, I do find it
useful to look at the assembly-language output of my compiler,
occasionally... especially when I'm doing something silly like, uhm,
"**(xyz[5])++" (I'm paranoid... when I write a bogosity, I want to
make sure it does EXACTLY what I want it to do).

--
Eric Lee Green    ..!{ames,decwrl,mit-eddie,osu-cis}!killer!elg
          Snail Mail P.O. Box 92191 Lafayette, LA 70509              



More information about the Comp.lang.c mailing list