Restore previous program section context directive
Format
.RESTORE_PSECT
.RESTORE
1 – Description
.RESTORE_PSECT retrieves the program section from the top of
the program section context stack, an internal stack in the
assembler. If the stack is empty when .RESTORE_PSECT is issued,
the assembler displays an error message. When .RESTORE_PSECT
retrieves a program section, it restores the current location
counter to the value it had when the program section was saved.
The maximum stack level is 50. See the description of .SAVE_PSECT
for more information.
2 – Notes
o The alternate form of .RESTORE_PSECT is .RESTORE.
o You cannot use .RESTORE_PSECT to overwrite previous data-
storage initializations. In the following example, MACRO-
64 attempts to store 42 over 43 and fails, resulting in a
diagnostic:
.PSECT A
.SAVE PSECT
.PSECT A
.QUAD 43
.RESTORE PSECT
.QUAD 42
3 – Example
.PSECT A,QUAD,NOEXE
A1: .WORD 5
A2: .QUAD 6
.SAVE_PSECT ; Saves psect A context
.PSECT B,QUAD,NOEXE
B1: .WORD 6
.RESTORE_PSECT ; Return A location counter
A3: .WORD 5
.PSECT B,QUAD,NOEXE
1$: .WORD 5
.SAVE LOCAL_BLOCK ; Saves psect B context and temporary
; label context
.PSECT C,NOEXE
1$: .WORD 6
.RESTORE_PSECT ; Restores psect B and saves
; label context
.ADDRESS 1$ ; References the address of
; psect B temporary label 1$