Let the Assembler work for you
Recently, (August 2001) I read an article entitled "Assembler Programming Revisited" by a systems programmer from whom I have learned much and for whom I have a great deal of respect.
In this article, however, I disagree with him strongly. He cites an example where one might need to define a print line as 0CL133 and in doing so, incorrectly define the 133 bytes that must follow. If you define fewer than 133 bytes within the scope of the 0CL133, fields following the 0CL133 can potentially be overlaid.
This systems programmer suggests that you should "pad" the 0CL133 with perhaps an extra 30 bytes or so. To use that systems programmer's expression, with all due respect. . ."malarkey!"
The correct way to ensure that your print line (or any other data area consisting of multiple fields) occupies as many bytes as you intended, is to let the assembler do it for you.
You can accomplish this using the ORG pseudo-op as follows:
In the above
example, three different report lines redefine the report line buffer
Before you move any data to the report line fields, you should initialize the report line to blanks as follows:
I will continue to add tips and techniques as time permits.
Please direct any
inquiries or problems regarding this web to email@example.com Revision Date:
Wednesday, November 15, 2006 10:02:53 AM
Revision Date: Wednesday, November 15, 2006 10:02:53 AM