API application
Parameters that are specified on the DSPAPI macro are either literals, addresses, or values. You can pass an address or a parameter value by using a register, a symbol, or a literal. You can specify literal values in mixed case.
- Use a register
- To use a register, you must load the address of a symbol or value
into one of the general purpose registers, and then use that register
(enclosed in parentheses) for the parameter in the DSPAPI request.
Use only registers in the range 2-12. Register notation does not work
with MF=L because this form does not produce executable code.
The following example shows how to pass an address using a register:
The previous example generates the following instruction:LA 5,OUTPUTAD DSPAPI FUNC=QUERY,OUTPUT=(5),... . . . OUTPUTAD DS A
ST 5,DSPAPI_Plist_Output
- Use a symbol name
- To use a symbol name, you must define a named area of storage
that either contains the desired value, or will receive a returned
address or value, and then use that symbol name for the parameter
in the DSPAPI request.
The following example shows how to pass an address using a symbol name:
The previous example generates the following instructions:DSPAPI FUNC=QUERY,OUTPUT=OUTPUTAD,.. . . . OUTPUTAD DS A
LA 0,OUTPUTAD ST 0,DSPAPI_Plist_Output
- Use a literal
- You can use literals for certain parameter values, such as time
stamps. To use a literal, pass the literal as a hexadecimal string
for the parameter in the DSPAPI request. Literals can also be mixed-case.
The following example shows how to pass a value using a literal:
The previous example generates the following instructions:72 DSPAPI FUNC=QUERY,TYPE=LOG, C STARTIME==XL12'1980030F191212009999028D'
LA 0,=XL12'198030F191212009999028D' ST 0,DSPAPI_Plist_Startime
Unless specifically noted, name fields are 8 characters long, left justified, and padded with blanks.