VMS Help
MACRO, VAX MACRO Assembler, Instructions, REI

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Purpose:        Exit from an exception or interrupt service routine
                    and control the return
    Format:         opcode
    Operation:      tmp1 = (SP)+; tmp2 = (SP)+;
                    if {tmp2<current_mode> LSSU PSL<current_mode>} OR
                       {{tmp2<IS> EQLU 1} AND {PSL<IS> EQLU 0}} OR
                       {{tmp2<IS> EQLU 1} AND
                        {tmp2<current_mode> NEQU 0}} OR
                       {{tmp2<IS> EQLU 1} AND {tmp2<IPL> EQLU 0}} OR
                       {{tmp2<IPL> GRTU 0} AND
                        {tmp2<current_mode> NEQU 0}} OR
                       {tmp2<previous_mode> LSSU tmp2<current_mode>} OR
                       {tmp2<IPL> GTRU PSL<IPL>} OR
                       {tmp2<PSL_MBZ> NEQU 0} then
                      {reserved operand fault};
                    if {tmp2<CM> EQLU 1} AND
                       {{tmp2<FPD, IS, DV, FU, IV> NEQU 0} OR
                       {tmp2<current_mode> NEQU 3}} then
                      {reserved operand fault};
                    if PSL<IS> EQLU 1 then ISP = SP else
                      PSL<current_mode>_SP = SP;
                    if PSL<TP> EQLU 1 then tmp2<TP> = 1;
                    PC = tmp1;
                    PSL = tmp2;
                    if PSL<IS> EQLU 0 then
                    begin
                      SP = PSL<current_mode>_SP;
                      if PSL<current_mode> GEQU ASTLVL
                      then {request interrupt at IPL 2};
                    end;
                    {check for software interrupts}
    C. Codes:       N = {saved PSL<3>}, Z = {saved PSL<2>},
                    V = {saved PSL<1>}, C = {saved PSL<0>}
    Exceptions:     Reserved operand
    Opcode:         02    REI      Return from exception or interrupt
    Description:    A longword is popped from the current stack and
                    held in a temporary PC. A second longword is popped
                    and held in a temporary PSL. Validity of the popped
                    PSL is checked. The current stack pointer is saved
                    and a new stack is selected according to the new
                    PSL current_mode and IS fields. The level of the
                    highest privilege AST is checked against the current
                    access mode to see whether a pending AST can be
                    delivered. Execution resumes with the instruction
                    being executed at the time of the exception or
                    interrupt. Any instruction lookahead in the CPU
                    is reinitialized.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.