Small Consolation

You can write quite a bit of source code in assembler without generating much object code. I’m always surprised at how small the object modules are after all my hard work. While assembler programmers work at a very fine-grained level, with most of our thoughts broken down into many tiny pieces, the instructions we use are quite powerful. A good chunk of each program consists of data areas – no real code there. And then each hard-won instruction only generates two, four or six bytes. The small object modules we create are even more surprising when you realize that much of the code is produced by IBM macros like OPEN, CLOSE, GET and PUT.

Try this experiment: Add the directive PRINT ON,NODATA,GEN at the top of your CSECT. Re-assemble your module and look at the program listing. If your code is typical, you’ll see lots of new statements that your didn’t see before. These lines are prefixed with a “+” sign and make up the code of your macro statements. It’s likely that a healthy percentage of lines in your program were macro-generated. If you coded very many macros, your own work may seem to disappear into the background.

So … write away without hesitation, knowing there’s plenty of room for all your ideas.

Leave a comment

Filed under IBM Mainframe Assembler

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s