Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site utcsri.UUCP
Path: utzoo!utcsri!moraes
From: moraes@utcsri.UUCP (Mark A. Moraes)
Newsgroups: comp.lang.misc
Subject: Re: assembly programming prefereable to HLL programming ? (LONG)
Message-ID: <3791@utcsri.UUCP>
Date: Mon, 15-Dec-86 09:36:25 EST
Article-I.D.: utcsri.3791
Posted: Mon Dec 15 09:36:25 1986
Date-Received: Tue, 16-Dec-86 19:37:43 EST
References: <646@instable.UUCP> <476@atari.UUcp> <8@blipyramid.BLI.COM>
Organization: CSRI, University of Toronto
Lines: 90

HLL vs Assembly => Sticks and stones

I thought that Djikstra, Wirth, Brooks et al. had terminated this
argument a long time back. Anyway, while its on, here are some 
pro-HLL points.

One BIG problem is learning all the assembly languages for all
those machines out there. If you're talking about Universal 
Assembly languages, what happens to originality in instruction
sets. You're taking away all they fun from those of us who design
chips. Try getting any CPU designers to agree on a standard (!)
Universal Assembly language and I suspect it will end up with 
a definition the size of Ada. 

Further, when a new CPU turns up, the main reason we can all start
getting useful work done immediately is because we port our 
SLOW BIG HLL code across and re-compile (OK- so its not that simple :-)
including OSs like UN*X. 

It saves the time of having to learn 
the assembly language of a new chip. As a matter of fact, I
think this debate was more or less settled when UNIX was written in
C (most of it, anyway). 

 > in article 476, landon dyer ({sun,lll-lcc,imagen}!atari!dyer) writes:
 
 > Generally, assembly-language programs will run faster (and will
 > be smaller) than compiler-generated code.  Depending on your
 > machine's architecture, though, you may never want to program in
 > its assembly language (e.g. IBM 801 and other RISCs).  Friendlier
 > machines like the 68000 are another story.
 
Unfortunately, RISC instruction sets can be learnt quickly, IF you
have to proggram in ASSEMBLER.
 
 > 	Humans are perfectly capable of using those "wierd, high level"
 > 	instructions that compiler writers claim are useless.  (Show me
 > 	a 68000 C compiler that uses MOVEP, TAS or SNE!)
 
By the time some of us humans learn what MOVEP, TAS and SNE are useful for,
and what their equivalents on, say the NS32332 or WE32000 are, the chips will
probably be outdated.

As someone who programs applications (CAD Tools for VLSI), I find 
portability across a large range of machines far more vital than
gaining a questionable 10-20% increase in speed. As an example, all
I had to do to port a simulator from a VAX to a NS32332, both running 
UNIX was to re-compile the source. It worked first time. I'm certain
enough people on the net will have had similar experiences.
I don't doubt that writers of compilers find the writing-speed/running-speed
trade-off much more difficult than I do. But today, when machine time
and memory are generally cheap, even they are coming down on the
side of portability - more machines = more software sold = more money.

Sure, assembler is really nice for transforming data coming from some 
sensor or something, but do you also want to write the user interface in
assembler? It boils down to the old software engineering saying about
re-writing the time-critical parts in assembler.

I'm willing to stick my neck out and claim that debugging is a lot 
easier in HLL's even if they don't have such things as symbolic 
debuggers. (as long as they have a printf/WRITE/PRINT statement.
Profilers are usually relatively easy to write if you don't get one with 
your source, and so are simple debugging tools. This pays off in
functionality of programs. 

Insidious bugs are a lot easier to make in assembler. In HLLs, with
such things as modularity and structured programming, it is actually 
possible to get something near bug-free the first time round. If not, 
bugs don't lie dormant for long, and even when they do, the are 
comparitively easy to correct. 

Many of us tend to like assembler BECAUSE it is difficult, and more
of a challenge. But there are a vast number of people who produce
useful programs in languages like C (which is comparitively low-level),
FORTRAN, Pascal, Euclid ...... If the high priests had their way, most of
these people would not be allowed near a computer - What!Make programming easy
so that the masses can write their own programs - Blasphemy!

About Lotus 1-2-3, I sometimes wonder why we haven't seen it on the
'new' 68000 machines like the 520ST, Amiga etc. Jazz is nowhere near it.
Maybe it has something to do with 8088 assembly not running on the
68000 :-) :-) Ah well! Makes Sidecar a very profitable business.

Mark Moraes.

uucp:{ihnp4 decwrl utzoo uw-beaver decvax allegra linus}!utcsri!moraes
arpa:moraes%toronto@csnet-relay
csnet:moraes@toronto
moraes%utoronto.bitnet