/sys$common/syshlp/helplib.hlb MACRO, VAX MACRO Assembler, Instructions, RET *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Purpose: Return from called procedure Format: opcode Operation: {restore SP from FP}; {restore registers}; {drop stack alignment}; {if CALLS, remove arglist}; {restore PSW} C. Codes: N = tmp1<3>, Z = tmp1<2>, V = tmp1<1>, C = tmp1<0> Exceptions: Reserved operand Opcode: 04 RET Return from procedure Description: SP is replaced with FP plus 4. A longword containing stack alignment in bits 31:30, a CALLS/CALLG flag in bit 29, the low 12 bits of the procedure entry mask in bits 27:16 and a saved PSW in bits 15:0 is popped from the stack and saved in a temporary (tmp1). PC, FP and AP are replaced by longwords popped from the stack. A register restore mask is formed from bits 27:16 of tmp1. Scanning from bit 0 to bit 11 of tmp1, the contents of the registers whose numbers are indicated by set bits in the restore mask are replaced by longwords popped from the stack. SP is incremented by bits 31:30 of tmp1. PSW is replaced by bits 15:0 of tmp1. If bit 29 of tmp1 is 1 (indicating a CALLS was used) a longword containing the number of arguments is popped from the stack. Four times the unsigned value of the low byte of this longword is added to SP and SP is replaced by the result.
|