gtpg2m09General Macros

Register Conventions

Registers usage is an important part of programming with macros. In the TPF system certain registers have specific uses:

Register
Usage

R8
E-type program base register.

R9
Entry Control Block (ECB) base register.

R10 - R13
Control Program base registers

These registers should not be used by application programs. Also various registers are guaranteed to remain the same across macro calls unless noted otherwise. These are R0 - R9.

In general, there are two types of macros:

Macro Type
Description

Executive
These macros generate either code or data that is incorporated into the program being assembled.

Generally, an executable instruction is generated.

Declarative
These macros produce information used by the assembly process while generating code.

TPF system programs utilize a large set of macro instructions to generate linkage(s) or to simply generate inline code. Many of these macros are restricted to system programs because the macros are subject to change in future releases and represent an unprotected interface. A macro with an unprotected interface is called a restricted use macro. Because some TPF system programs run in the application execution environment, some of the restricted use macros also generate SVC linkages.