Returns address argument from the command line or cursor position as
appropriate.
>>-EXTract--+-ARGument-+--+----------+-------------------------><
'-ARGs-----' '-argument-'
- argument
- An expression.
If it is invalid, the EXTRACT ARGUMENT command
completes with a nonzero return code.
If EXTRACT ARGUMENT completes with a nonzero return code, an
appropriate error message is placed on the screen by IDF and the
macro should exit with RC=-3, to stop IDF overlaying
the error message with another message stating the macro return code
(if the macro exits with a nonzero RC), or clearing the command line
(if the macro exits with RC=0).
If the command line is empty, IDF attempts to determine an
address based on cursor position.
REXX variables set
- SOURCE
- Contains the source of the argument:
- blank
- No argument was available
- COMMAND
- The argument was obtained from the command line
- PSWGPR
- The argument was obtained from cursor position within the Current Registers window
or the Old Registers window
- DISASM
- The argument was obtained from cursor position within the
Disassembly window
- DUMP
- The argument was obtained from cursor position within the Dump window
- FIELD
- 8-character hexadecimal address; if determined from cursor
position, the address corresponds to the first byte of the field in
which the cursor was positioned.
- EXACT
- 8-character hexadecimal address; if determined from cursor position
in a dump display, the address corresponds to the exact byte of the
field in which the cursor was positioned.
Otherwise EXACT is the same as FIELD.
- INDIRECT
- 8-character hexadecimal address.
If determined from the cursor position in the Disassembly window, and the
cursor was positioned at the first instruction shown, and that
instruction is a branch, the value in INDIRECT is the effective
address of the branch instruction.
If determined from cursor position in a Dump window, and the cursor was in
the first field displayed, and that field is a fullword, INDIRECT will
contain the contents of the field rather than its address.
Otherwise INDIRECT is the same as FIELD.
If the argument was determined from the command line, variables
FIELD, EXACT, and INDIRECT will contain the same value.
EXTRACT ARGUMENT follows the rules for obtaining arguments that are
described in Arguments and cursor positioning.