VMS Help  —  MACRO  /ALPHA  Supplied Library Macros, $LINKAGE PAIR
    Locates or defines a linkage pair in the linkage psect.

    Format

      $LINKAGE_PAIR  name=routine-name, local=boolean

1  –  Parameters

 name

    Name of the linkage pair to define. This argument is required.

 local

    A Boolean value (TRUE or FALSE) that specifies whether the
    routine is defined within the module for not. The default is
    to store a linkage pair for a global routine. You must specify
    LOCAL=TRUE to store a linkage pair for a routine that is not
    globally visible.

2  –  Description

    You can invoke this macro to locate or define a linkage pair
    in the linkage psect. The linkage pair is added to a list for
    later use and retrieval by the $CALL and $LINKAGE_PAIR macros.
    Thus, only the first invocation of $LINKAGE_PAIR (or $CALL) for
    a given routine to be called results in a linkage pair being
    stored. $LINKAGE_PAIR and $CALL use the same list of linkage
    pairs. $LINKAGE_PAIR restores the current psect when it is done.

    $LINKAGE_PAIR defines the symbol $LP. This symbol value is the
    address within the linkage section of the linkage pair for the
    specified routine to call.

3  –  Notes

    o  Because the $CALL macro invokes the $LINKAGE_PAIR macro
       for you, you do not need to use $LINKAGE_PAIR when you are
       using $CALL. You may wish to use $LINKAGE_PAIR when you are
       not using $CALL or when you require a specific ordering or
       placement of linkage pairs within the linkage section.

4  –  Example

    $LINKAGE_PAIR SUB1  ; define linkage pair in linkage section
    LDQ R26, $LP
    LDQ R27, $LP+8
    JSR R26, R26
Close Help