Use this system macro to return to the caller the address of the next
storage block queued on the specified system task dispatcher list.
Format
- BLOCK=R1|Rx
- On input, the register specified contains a value indicating whether to
get the address of the first block or the next block on the specified system
task dispatcher list. The value 0 means get the address of the first
block. Any other value means get the address of the next block on the
list following the address specified (as the value).
On output, the register specified contains either the same value or the
address of the requested block (for example, the first one or the next one) on
the specified system task dispatcher list. The value is unchanged when
one of the following occurs:
- The address of the first block was requested but the specified list is
empty
- The address of the next block was requested but there are no more blocks
on the specified list
- The address of the next block was requested but the specified block is not
on the specified list.
The default is R1.
- LIST=R0|Rx
- The register specified on this input parameter contains a list equate
value as defined in macro CLHEQ. Equate values are assigned to the
Cross, Ready, Input, and Defer lists. If the parameter is omitted, the
default assignment is R0. Valid equate values are:
- #CLHCRS
- Cross List
- #CLHRDY
- Ready List
- #CLHINP
- Input List
- #CLHDEF
- Defer List
- SAVREG
- The specified volatile registers will be saved by the macro in
the stack area or in the registers specified by the WKREG parameter. Up
to 3 registers can be specified. Those registers are R0, R1, R2.
If this keyword is omitted, none of the 3 registers will be saved. You
should not save a volatile register if you expect it to contain an output
parameter. The register will be overwritten with its original contents,
since the reload is the last thing performed by the macro.
- WKREG
- The specified symbolic register names are free to be used by the macro to
save the volatile registers coded on the SAVREG parameter.
Up to 3 registers can be specified, but the standard linkage registers R13
through R2 cannot be used here. This parameter is used in conjunction
with the SAVREG parameter to generate efficient code and enhance the
performance of the macro. The number of registers specified by WKREG
should be less than or equal to the number of registers specified by
SAVREG. If this parameter is omitted or not used to its maximum
capacity, code optimization is sacrificed.
Entry Requirements
The register specified on the LIST parameter must contain a value that
corresponds to one of the system task dispatcher lists.
Return Conditions
- Control is returned to the next sequential instruction (NSI).
- The condition code is set to 0, 1, or 2 as follows.
- Condition Code
- Meaning
- 0
- The requested block was found successfully.
Its address is in the register specified on the BLOCK parameter.
It is the last block on the specified list.
- 1
- The requested block was found successfully.
Its address is in the register specified on the BLOCK parameter.
It is not the last block on the specified list.
- 2
- The specified list is empty.
The specified block (for example, the block whose address is specified on
the BLOCK parameter) is not on the specified list.
- The register specified on the BLOCK parameter contains either the same
value (in the condition code 2 case) or the address of the requested block
(for example, the first one or the next one) on the specified system task
dispatcher list (in the condition code 0 or 1 cases). The value is
unchanged when the address of the:
- First block was requested but the specified list is empty
- Next block was requested but there are no more blocks on the specified
list
- Next block was requested but the specified block is not on the specified
list.
- The registers specified on the WKREG parameter will be used to save the
contents of any volatile registers specified on the SAVREG parameter.
All other registers will be returned intact.
Programming Considerations
- This macro can be run on any I-stream.
- This macro is for use in the control program (CP) only.
Examples
None.