Just one more assembler vs. high level language war story.
A number of years ago while workign at a large back, we had a Personal Trust
system that had been written in IBM 360 assembler. Our bank was primarily a
Burroughs (Unisys) shop. The vendor, a major accounting firm, had ported
the code to Burroughs COBOL. The Burroughs programmers really hated the
code as there were a lot of cases such as:
pa.
alter r5return to goto pb.
goto code.
pb.
...
code.
...
goto r5return.
r5return.
goto.
I was the only person on the team who knew IBM assembler. The first time I
saw that sequence, my comment was "this is nothing but a "balr" instruction
using register 5 as the subroutine return register. (Note that the IBM
mainframes were not stack machines).
But, my point about C++ and assembler is missed.
While a well written and commented assembler program can be highly
maintainable, a program PROPERLY written in a higher level language should
be more maintainable and more portable. However, the assembler code should
perform better. In terms of maintainability, assembler is generally no
taught in most schools where C++, C and Java are. In the case of the
programming staff at the bank, I was probably the only programmer analyst
who knew IBM assembler (a couple of the systems programmers did).
Burroughs COBOL had a nice feature (similar to the C asm() function):
Procedure Division.
par.
...
enter symbolic
assembler code
...
enter cobol.
The Burroughs system did not have a linkage editor, so your code had to be
monolithic. They did have an efficient way to spawn a child process,
though.
--
Jerry Feldman