Communication and work areas

The interface between High Level Assembler and its I/O exits establishes a "coroutine" interaction: both the assembler and the exit routine must cooperate, with neither being fully in control of the other. All interactions take place through the I/O exit parameter list. This list is described in more detail in Exit parameter list.

The actions to be taken by the exit and the assembler are determined by the values of the request type (when the assembler calls the exit) and the return and reason code (when the exit returns to the assembler)

The I/O exit interface uses standard OS linkage conventions, and the parameter list follows standard OS parameter-passing conventions. (In fact, this interface is designed to allow exit routines to be written in most high-level languages.) The high-order bit of the last pointer in the I/O exit parameter list is set to 1.

When the HLASM Services Interface is present, the seventh parameter of the I/O exit parameter list (the HLASM Services Interface pointer) points to the HLASM Services Interface block, illustrated in Figure 85. The high-order bit of this parameter pointer is set to 1.

Figure 85. HLASM Services Interface Block
*--------------------------*
| C'HSIB'                  | HLASM Services Interface Block Identifier
*--------------------------*
| HSI block version        | Version number of this block
*--------------------------*
| HSI block length         | Length of this block
*--------------------------*
| ^ Service entry point    | A(Services entry point in HLASM)
*--------------------------*
| ^ Work area              | A(work area provided by HLASM)
*--------------------------*
| Number of argument words | Number of argument words for the service
*--------------------------*
| Number of value words    | Number of returned-value words for the service
*--------------------------*
| Request type             | Type of request
*--------------------------*
| Return code              | Return code from the HLASM service
*--------------------------*
| Reserved (3)             | Reserved (3 words)
*--------------------------*
| Argument 1               | Argument word 1
*--------------------------*
:                          :
*--------------------------*
| Argument 10              | Argument word 10
*--------------------------*
| Returned value 1         | Returned-value word 1
*--------------------------*
:                          :
*--------------------------*
| Returned value 10        | Returned-value word 10
*--------------------------*

The fields in the HLASM Services Interface Block are set by different means:

The fields in the HLASM Services Interface Block are:

  1. HLASM Services Interface block identifier: the EBCDIC characters 'HSIB'.
  2. HLASM Services Interface block version. Currently, this is set to 1.
  3. HLASM Services Interface block length.
  4. The address of the entry point in HLASM that services requests made by way of the HLASM Services Interface block.
  5. The address of a 32-byte doubleword-aligned work area provided by HLASM for the use of the service requester.

    These first five fields are initialized by HLASM before invoking an exit or external function.

    The next three fields are set by the service requester.
  6. The number of argument words. Their number and contents is described below for each supported service. The maximum number of argument words for this version of the HLASM Services Interface block is 10.
  7. The number of returned-value words. Their number and contents is described below for each supported service. The maximum number of returned-value words for this version of the HLASM Services Interface block is 10. This value is set by HLASM.
  8. The type of service request:
    1. Get storage service (see Get storage service)
    2. Return storage service (see Return storage service)
    3. Time and date service (see Time and date service)
    4. Write-to-terminal service (see Write to terminal service)

    Each service is described below.

  9. The return code provided by the HLASM Services Interface service, indicating the status of the request. The values of the return code are:
    0
    Service completed successfully
    4
    Service-dependent value
    8
    Service-dependent value
    20
    Bad or unsupported service request type
    24
    Wrong number of arguments for this service type
    28
    Invalid argument for this service type
    32
    Returned-values list not long enough for this service type
  10. The remaining words in the list are the argument words (set by the service requester) and the returned-value words (set by the HLASM Services Interface).

[ Top of Page | Previous Page | Next Page | Contents | Index ]