comp.lang.ada
 help / color / mirror / Atom feed
From: Richard D Riehle <laoXhai@ix.netcom.com>
Subject: Re: Compiler for Z80/6510
Date: 1999/12/06
Date: 1999-12-06T19:44:37+00:00	[thread overview]
Message-ID: <82h3n5$cna$1@nntp4.atl.mindspring.net> (raw)
In-Reply-To: 1103_943587334@DZOG-CHEN

In article <1103_943587334@DZOG-CHEN>,
	falis@ma.aonix.com (Ed Falis) wrote:


>My take on it, having been involved in Ada compilers for a long time, is
>that an optimizing compiler can do well compared to the average
>programmer, turned to assembly language.  But, a good assembly
>programmer for a given architecture can do better.  This isn't rocket
>science - human intelligence generally beats what we can simulate with
>machines.

It has been a long time since I have written assembler language
programs, but I recall how we used to take advantage of all sorts
of little tricks that an optimizer would not dare to assume.  We 
could turn data into instructions and instructions into data, take
advantage of knowledge concerning register contents at a specific 
point in the execution cycle and use that register in obscure ways.
By knowing all of the instructions in a CISC set, one can do 
software contortions one would not expect of a compiler. 

If this makes you wonder about maintainability, you wonder correctly. 

In the long run, the maintainability of the compiler-generated code
has significant advantages over the hand-tinkering we so loved to do
in those primeval days of assembler only.  There is a certain tendency
to elitism here, as well. "Only whimps and sissies use compilers."

Robert Dewar is fond of emphasizing "readability over writeability."  
It is not unusual for an assembler programmer to write a program 
that is highly efficient but totally unreadable, or contains 
instructions that seem to make no sense at all.  "Why are there six
successive NOP's in this code?"  "Why does this instruction add 
Hex FFFF to this register?" 

Yes, a good assembler programmer can write more efficient code.  It 
will even work until someone updates the instruction set or changes the
timing characteristics of the processor.  

Richard Riehle
http://www.adaworks.com 




  parent reply	other threads:[~1999-12-06  0:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-24  0:00 Compiler for Z80/6510 Lutz Donnerhacke
1999-11-24  0:00 ` Tucker Taft
1999-11-24  0:00 ` Frank Klemm
1999-11-24  0:00   ` Lutz Donnerhacke
1999-11-24  0:00 ` Wil
1999-11-25  0:00   ` Lutz Donnerhacke
1999-11-25  0:00     ` Robert Dewar
1999-11-25  0:00       ` Peter Milliken
1999-11-26  0:00         ` Tarjei Jensen
1999-11-26  0:00         ` Ed Falis
1999-11-26  0:00           ` Robert C. Leif, Ph.D.
1999-11-27  0:00             ` Florian Weimer
     [not found]             ` <01bf38cb$be9b2b60$022a6282@dieppe>
1999-11-28  0:00               ` Robert Dewar
1999-11-28  0:00                 ` Robert A Duff
1999-11-30  0:00                 ` Pascal Obry
1999-11-28  0:00             ` Robert Dewar
1999-12-06  0:00           ` Richard D Riehle [this message]
1999-11-26  0:00         ` Robert Dewar
1999-11-26  0:00           ` Robert A Duff
1999-11-27  0:00             ` Robert Dewar
1999-12-01  0:00             ` Robert I. Eachus
1999-12-02  0:00               ` Larry Kilgallen
1999-12-02  0:00                 ` Robert I. Eachus
1999-12-03  0:00               ` Robert Dewar
1999-12-03  0:00                 ` Robert I. Eachus
1999-12-06  0:00                   ` Robert Dewar
1999-12-13  0:00                     ` Robert I. Eachus
1999-12-13  0:00                       ` carr_tom
1999-12-17  0:00                         ` Robert I. Eachus
1999-12-19  0:00                       ` Robert Dewar
1999-12-21  0:00                         ` Robert I. Eachus
1999-12-23  0:00                           ` Robert Dewar
1999-12-23  0:00                             ` Robert I. Eachus
1999-11-26  0:00       ` Vladimir Olensky
1999-11-26  0:00         ` Robert Dewar
1999-11-26  0:00           ` Vladimir Olensky
1999-11-27  0:00             ` Robert Dewar
1999-11-28  0:00               ` Vladimir Olensky
1999-11-29  0:00 ` Marin Condic
1999-11-29  0:00   ` Lutz Donnerhacke
1999-11-29  0:00     ` Marin Condic
1999-11-29  0:00       ` Lutz Donnerhacke
1999-11-29  0:00   ` Mike Silva
1999-11-29  0:00     ` Marin Condic
1999-11-29  0:00       ` Mike Silva
1999-11-29  0:00       ` John Duncan
1999-11-30  0:00         ` Lutz Donnerhacke
1999-11-30  0:00       ` Tarjei Jensen
1999-11-29  0:00   ` Robert C. Leif, Ph.D.
1999-12-01  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox