IBM Support

Relative Addressing

Question & Answer


Question

My assembler application program needs another code register. What can I do?

Cause

Your assembler program has grown and requires additional base registers.

Answer

Traditionally, assembler programs have used a base register and displacement value to reference labels or variables within a program. Organisations invariably require extra functionality to be added to their applications. As programs are modified and functionality added, these programs increase in size. At some point they end up requiring extra base registers to address the new code. The first time around, you find a spare register and use it. However, there comes a point when there are no spare registers left to use. Usually the developer will consider modifying the program to either save/restore registers in order to reuse them, or if that is not possible, consider splitting the program into two. Modifications of this nature, on top of those being added to meet new business requirements mean: extra coding, extra testing, extensive regression testing, and on top of that, potential delays in delivering new business requirements. Changes of this nature are a costly undertaking.

The attached PDF uses a sample program to illustrate how relative addressing can be added to it and thereby alleviate the need for additional base registers.

[{"Product":{"code":"SSENW6","label":"High Level Assembler and Toolkit Feature"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Assembler","Platform":[{"code":"PF035","label":"z\/OS"},{"code":"PF037","label":"z\/VM"}],"Version":"1.6","Edition":"Enterprise","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
02 August 2018

UID

swg21598282