CALL Macro



When used to invoke a named Control Section (CSECT), CALL is being used in static linkage mode.

If however the address of the required routine is known, as it would be if the LOAD macro had been issued, then CALL can be used in dynamic linkage mode.

Dynamic Linkage format of the CALL Macro.



CALL syntax for dynamic linkage



(15)

This represents General Purpose Register 15 which will contain the address of the module to receive control.

In truth it does not have to be GPR 15, but it is logical for it to be 15 as linkage convention is that during a transfer of control GPR 15 will contain the address to receive control, and GPR 14 will contain the return address.

(addr1 etc

This is optional and identifies one or more parameters to be passed to the called module.


The IBM manual includes descriptions of the LIST (MF=L) and EXECUTE (MF=E) formats which are useful for constructing re-entrant code.

Copyright © Legac-e Education 2004-