Assembly or ....

Tom Granvold tom at garth.UUCP
Tue Nov 29 03:23:22 AEST 1988


-

    I must jump in on this discussion with my two cents worth.  There are
definitly cases where assembly language is not only appropriate, but 
nesscary!

    I write diagnostics that test the hardware in computer systems which
makes me a member of very small minorty of programers.  While reasonable
memory tests can be written in languages such as C or Forth, many other
tests require assembly language.  For example in the newer CPU's, especially
RISC chips, it is becomming common to have pipelining of instruction
execution and register scoreboarding.  In order to reasonably test these
features, one must be able to specify exactly whe sequence of instructions
that are to be executed.

     The second need for assembly is in real time control.  In my previous
job we were using a Z80 to control several stepper motors.  The critical
timing restrictions accured in the interrupt routines.  While there were
high level languages available for the Z80 none, that we were aware of,
were optimizing compilers.  Therefore we were able to produce much faster
code in assembler.  This was a case where every machine cycle was of
importance.  The most importent comment in the source code was the number
of machine cycles each instruction took.  Yes we could have used a newer
faster CPU that has  optimizing complier available for it, but Z80's are
cheap!

Thomas Granvold



More information about the Comp.lang.c mailing list