SAVE — Save register contents
Description
The SAVE macro stores the contents of the specified general purpose registers in the save area at the address contained in register 13. If you wish, you may specify an entry point identifier. Write the SAVE macro only at the entry point of a program because the code resulting from the macro expansion requires that register 15 contain the address of the SAVE macro prior to its execution. Do not use the SAVE macro in a program interruption exit routine.
Syntax
The SAVE macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede SAVE. |
SAVE | |
␢ | One or more blanks must follow SAVE. |
(reg1)
(reg1,reg2) |
reg1 and reg2: Decimal digits, and in the order 14, 15, 0 through 12. |
,
,T |
|
,id name | id name: Character string of up to 70 characters or as an *. |
Parameters
The parameters are explained as follows:
- (reg1)
- (reg1,reg2)
- Specifies the register or range of registers to be stored in the save area at the address contained in register 13. The registers are stored in words 4 through 18 of the save area.
- ,
- ,T
- Specifies that registers 14 and 15 are to be stored in word 4
and 5, respectively, of the save area. This parameter permits you
to save two noncontiguous sets of registers.
If you specify both T and reg2, and reg1 is any of registers 14, 15, 0, 1, or 2, all of registers 14 through the reg2 value are saved.
- ,id name
- Specifies an identifier to be associated with the SAVE macro. If an asterisk (*) is coded, the identifier is the name associated with the SAVE macro, or, if the name field is blank, the control section name is used. The identifier aids in locating a program's save area in a dump. If the CSECT instruction name field is blank, the parameter is ignored.
Whenever a symbol or an asterisk is coded, the following macro
expansion occurs:
- A count byte containing the number of characters in the identifier name is assembled four bytes following the address contained in register 15.
- The character string containing the identifier name is assembled starting at five bytes following the address contained in register 15.
- An instruction to branch around the count and identifier fields is assembled.
Example
Save registers 14-12, and associate the identifier with the CSECT
name.
SAVE (14,12),,*