From: kochmar@sei.cmu.edu (John Kochmar)
Subject: Re: Assembly is God (was Re: Program in assembly...NOT!)
Organization: The Software Engineering Institute
Date: Fri, 11 Dec 1992 13:00:44 EST


In article <bazyar.723980811@teal>, bazyar@teal.csn.org (Jawaid Bazyar) writes:
|> 
|>   I don't normally read this group, and in fact am just visiting via
|> a cool feature of nn, but I have to say this: You are _so_ _totally_
|> _wrong_.  Use your brain for once (you obviously don't often, or
|> you wouldn't be incorrect here).  The day a compiler can outcode me,
|> for example, is the day I get up in the morning and have a conversation
|> about the weather with my CPU.  Code generation like you think C
|> compilers can do only applies to RISC processors, whose instruction
|> sets were designed for optimizing compilers.

RISC instruction sets weren't designed for optimizing compilers.
However, programming pipelines are complex beasts, and RISC compilers
are better at efficiently laying out machine instrutions to take fuller
advantage of the machine than most programmers.

Actually, my understanding of compilers is based on discussions with
compiler designers, and books on the topic.

It is quite possible that your knowledge of assembly is greater than
the sum of all compiler designers, code optimizing theoriticians, and
the horde of individuals who have studied processors with the hope of
providing better tools for their programming.  Or, you could be an
arrogant little twit with his head in the sand.  I won't comment on
which I think you are.

|>   Last time I checked, the SNES and Genesis machines did not have
|> RISC processors.  I've written C compilers for the 65816 (SNES)
|> and I can guarantee you that the compiler state of the art cannot
|> possibly compete with hand-coded assembly.

You guarentee?  Based on what criteria?  Speed alone?  Program
correctness?  complexity?  Time to code a working system?

|>   And finally, people who think that assembly programming is either
|> tedious or stupid have obviously never done it.  There are two
|> wonderful inventions that most of you morons have never heard of;
|> 'macro assembler', and 'library management'.

I've coded in Z80, 6800, 680x0, Perq microcode (you haven't lived until
you have sat down and figured out fetch cycles for memory, and hand
tuned your code so that your rasterop could fill the maximum amount of
screen buffer before exiting to allow the screen refresh code to
acitvate between refresh cycles), Microvax I microcode, and Vax
assembler.  I wrote a 6800 processor emulator (and assembly subroutines
to be used in support of a mini OS for the project) as part of a
software enginerring team project, and had to design a working
stack-based processor and microcode for another project class (the
processor was run with the microcode based on a processor simulator
developed here at CMU, so it had to work, and speed of working
execution determined your grade.)  So, save your ramblings for someone
who cares.

Yes, I've heard of macro assemblers and library management.  Both are
key parts of compiler theory.  What's your point?

|> -- 
|>  Jawaid Bazyar              |   Ask me about the GNO Multitasking Environment
|>  Procyon, Inc.              |   for the Apple IIgs!   
|>  bazyar@cs.uiuc.edu         |   P.O Box 620334
|>  --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 933-4649


-----------------------------------------------------------------------------
John Kochmar		 | Estimated amount of glucose used by an adult human
kochmar@sei.cmu.edu	 | brain each day, expressed in M&Ms: 250
SEI Computing Facilities |			-Harper's Index, October 1989