Why assembler?

Using assembler as a programming language is not so popular any more. As a rule people prefer to use a third or fourth generation language.

Usually - for "vanilla" applications - this is absolutely right. There are however situations in which it is prudent to thoroughly weigh both the arguments for and against using assembler.

On the one hand are the arguments against the use of assembler in large part prejudicial, on the other hand are the arguments for the use of assembler relatively unknown. When you do know the prejudices against assembler without knowing the advantages, it becomes very hard indeed to take any objective decisions concerning the choice of programming language.

One rule remains important - as it does for any programming language: without well-trained people you'll never get anywhere, without proper documentation you'll end up not even knowing where you are.

Below you will find an overview of the most important advantages of assembler. Thereafter we will try to shade the prejudices. We then end with a short summary.

The advantages of assembler.

Working with assembler offers you a range of capabilities, which are not (all) available for 3GL- of 4GL-programmers.

The prejudices against assembler.

There are several prejudices against working with assembler. The most important ones are:

  1. In assembler structured programming is impossible.
    This is untrue. In this area assembler actually offers more facilities than most 3GLs.
  2. Maintaining assembler programs is vastly more costly than maintaining 3GLs.
    When 3GLs were introduced this may have been true. Now however, this statement is highly debatable.
  3. Assembler is a cumbrous language, and hard to learn.
    Assembler is indeed a little less readable to the layman than e.g. Cobol. Such languages as C and C++ on the other hand are more difficult to master.
Ad 1.
In assembler structured programming is impossible.
Bringing structure into programs is first and foremost a matter of style and craftsmanship. If the programming language in use offers good facilities in this area, that can be an aid, but no more than that.
Ad 2.
Maintaining assembler programs is vastly more costly than maintaining 3GLs.
When 3GLs were first introduced there was a vast base of existing assembler programs. Because structured programming was a relatively new phenomenon in those days, these programs often left a lot to wish for as far as structure was concerned. In assembler - as in any other language - you can create as much or as little structure as you want. With all the usual consequences for their maintainability.
In assembler you do have more opportunities than in most 3GLs to make a mess of things. Thanks to the macro-facilities, however, you also do have a considerable number of extra options for bringing structure into your programs, as compared to other languages.
Furthermore the matter of craftsmanship is of primary importance. A 3GL-programmer also "doing some assembler" can never measure up to the professional assembler-programmer. The effects are measurable not only in the time required to get the job done, but also in the quality of the code produced. The main problem, then, is how to get experienced professionals on your team. A problem you will encounter anyhow, whichever the programming language of your choice may be, especially under current conditions.
So, if we do want to make a fair comparison for required manpower between assembler and 3GLs, we will have to compare craftsmen with craftsmen, and we will also have to take the age of the programs (read: measure of structure) into account, as well as the quality of the available documentation.
Our experience for new programs is, that you will need some 10 to 20 percent extra manpower for working with assembler. When maintenance is concerned, the differences are too dependent on the availability of documentation and on the amount of structure in the programs to give any meaningful figure.
An example: one of our customers owns both an assembler module, which was created by us, and a Cobol module. They both do exactly the same thing. For the last few modifications the assembler-programmer was ready in one day, whereas the Cobol-programmer needed a three days. Though this may seem exceptional, it proves that maintenance on assembler programs is not by definition more costly than maintenance on 3GL-programs.
Ad 3.
Assembler is a cumbrous language, and hard to learn.
If you are dependent on "laymen" you should certainly not choose to use assembler. As with any other language you would only be creating your own difficulties.
Of course there also are skilled craftsmen around. These do not only master the skills of assembler-programming, they also have a thorough knowledge of the macro-facilities the assembler-language offers. This enables us to code swiftly, efficiently, and neatly.


The arguments for and against the use of assembler can be summarized as follows:

Taking it all together, our standard advise is: do not use assembler when there is no need to. On the other hand, if you have good reasons to do so, don't shy away from it; assembler is not frightening. And if you do choose to use assembler, use it only for those modules that will benefit from it. The largest part of your application is probably best built in your favourite 3GL of 4GL.

Lastly, for some applications it simply is impossible to use any language but assembler. This holds specifically for most exits.
Not only the operating system, but also a good many standard products are endowed with exit points, to enable installations to adapt the software to their own requirements. For most exits coding in assembler is simply unavoidable. With the arguments given above this should (no longer) raise any insurmountable problems.


This site is a member of WebRing.
You are invited to browse the list of mainframe-loving sites.
    Tyrannosaurus Rex Dinos are not dead. They are alive and well and living in data centers all around you. They speak in tongues and work strange magics with computers. Beware the dino! And just in case you're waiting for the final demise of these dino's: remember that dinos ruled the world for 155-million years!
Dinos and other anachronisms
[ Join Now | Ring Hub | Random | << Prev | Next >> ]

To the advantages of assembler.
To the prejudices against assembler.
To the summary.

To the English Homepage.
To the general Homepage.

Below you find the logo of our sponsor and logos of the web-standards that this page adheres to.