Assembly or ....

Fraser Orr orr at cs.glasgow.ac.uk
Sat Nov 26 00:39:11 AEST 1988


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.

Do you think it is important to understand how transistors work as well?
The semantic level of most mircoprocessors is high enough that
learning a HLL is pretty much sufficient these days (compare 68000 asm
to C for example.) In the good old days, when men were men and transistors
were valves, I think your statment was true. I also think that you needed
a fair understanding of how the electronics worked. As things have developed
I think the abstract level, that it is necessary to understand computers at,
has been slowly progressing upward.

>Also, there are certain pieces of code that may be worth coding in
>assembly language because speed is very important or because they can't
>easily be coded in a machine-independent fashion in a high level language
>anyway.  In the former case, recall that in many programs, most of the
>run time is spent executing only a few lines of source code; thus it may
>be necessary to write only a small amount of assembly language.  In the
>latter case, assembly language is no less portable and may actually be
>more readable, especially if the high level language is not very suitable
>for the task at hand.

I don't agree that there is ever any necessity to code in assembler. We
have languages that produce code just as good as hand crafted assembler
(such as C), so why not use them for this sort of thing.
As to your comments on portability, your implication seems to be that
the reason you use a  HLL is to facilitate portibility, the reason I use
then is that they are easier to code in, easier to debug, and easier
to maintain ( particularly by people that didn't write the code originally).
Although portibility is clearly an issue, there things are equally if not
more important.
As to assembler being more readable, I think that assembler is not very
sutiable for any task at hand.

==Fraser Orr ( Dept C.S., Univ. Glasgow, Glasgow, G12 8QQ, UK)
UseNet: {uk}!cs.glasgow.ac.uk!orr       JANET: orr at uk.ac.glasgow.cs
ARPANet(preferred xAtlantic): orr%cs.glasgow.ac.uk at nss.cs.ucl.ac.uk



More information about the Comp.lang.c mailing list