In Assembler language, linkage is performed according to the usual
operating system (OS) conventions:
- Register 1 points to the address list containing the parameter
addresses. The high-order bit must be set in the last word. If no
parameters are to be passed, Register 1 must contain the value 0 or
must point to a fullword of value 0 with the high-order bit set.
- Register 13 points to a register save area of at least 72 bytes (18
fullwords).
- Register 14 points to the return point in the application program.
- Immediately before a call to GDDM, Register 15 points to the entry
point with the name "callname." On return from a call to GDDM, the
top half of register 15 contains the error severity code; the bottom
half contains the error number.
- A branch to "callname" is performed.
Parameters must be declared as:
- Fullword integer
- F-constant
- Halfword integer
- H-constant
- Floating-point
- E-constant
- Character
- C-constant
- Array
- Contiguous fullwords or halfwords
- Structures
- Use the appropriate storage mapping.
In Assembler language, linkage can be performed using the OS CALL macro,
coded with the VL option. For example:
CALL ASFCOL,(ID,COLOR),VL
.........
ID DC F'1'
COLOR DC F'3'
Note: Calls with no parameters must be coded in this form to ensure that
register 1 is set correctly:
CALL FSINIT,(0),VL
|