Need Assembly lang. to learn C?

Pete Holsberg pjh at mccc.edu
Sun May 26 00:14:56 AEST 1991


In article <4407 at inews.intel.com> bhoughto at pima.intel.com (Blair P. Houghton) writes:
=In article <1991May22.094917.28322 at rodan.acs.syr.edu> ldstern at rodan.acs.syr.edu (Larry Stern) writes:
=>least a working knowledge of Assembly will help produce a better understanding
=>of the C language and tighter C code.
=
=I've had it.
=
=I've started to respond to this thread three times, but
=always ended up sounding like I wanted a language-religious
=argument, so I forgot it.  But this one is the killer.

Agreed.

=Please, please, please, once you've learned assembler and
=the inner workings of a computer, please, please, please,
=forget all of it and don't even try to mimic it in your
=C code.

No and yes.

=There is _nothing_ in C that even remotely resembles
=assembly language or the internal construction of a cpu or
=memory.  Comp.lang.c spends much of its time debunking the
=myth of optimizing performance through minor code changes.

The reason that many of us recommend assembly language programming as a
prerequisite to a C course has nothing to do with mimicking or
optimization or interfacing devices to a computer bus or even designing
microcode.  It's simply that having thought about registers, and
allocating memory for data tables and variables, and the stack, etc., a
begining C programmer will have a better idea of what is happening when
things go wrong in a C program.

Pete
-- 
Prof. Peter J. Holsberg      Mercer County Community College
Voice: 609-586-4800          Engineering Technology, Computers and Math
FAX: 609-586-6944            1200 Old Trenton Road, Trenton, NJ 08690
Internet: pjh at mccc.edu	     TCF 92 - April ??-??, 1992



More information about the Comp.unix.questions mailing list