HLASM - SPM = Set Program Mask

The opcode of the SPM instruction is X'04'.

Usage

  1. Restore the condition code and program mask to a saved value, usually after execution of a routine that might have changed their values.
  2. Set the program mask to specify how the processor is to deal with the associated program interruptions.

Arguments

  1. Register holding the new Condition Code and Program Mask.

Function

  1. The processor uses bits 2-3 of the argument to set the PSW's condition code and bits 4-7 to set the PSW's program mask, which determines how the processor handles certain program exceptions.
  2. The condition code receives the value specified in the argument.

Special Cases

  1. None.

Related Instructions

  1. IPM is the preferred instruction for extracting the current program mask form the PSW.
  2. BALR can be used also to extract the current program mask form the PSW.

Hardware

  1. All hardware supports the SPM instruction.

Remarks

  1. The relevant bits of the argument are located in the high-order byte of the 32-bit register. These are usually derived from a BALR in Amode 24 or an IPM.

Examples

         YREGS                          * Define register names
         ...
SAVESTAT IPM   R2                       * Save current status
*
* Now that PSW status has been saved, we can change the program mask:
* Bit 0 = 0 to ignore fixed point overflow conditions
* Bit 1 = 0 to ignore decimal overflow exceptions
* Bit 2 = 1 to catch HFP exponent underflow
* Bit 3 = 1 to catch HFP significance exceptions
*
         LA    R1,X'03'                 * CC=0, Program Mask=B'0111'
         SPM   R1                       * Activate new program mask
         ...
         SPM   R2                       * Restore status to saved state

To the Opcodes Overview.
To the English Homepage for Hlasm.com.
To the General Homepage for Bixoft and Hlasm.com.

This site is a member of WebRing.
You are invited to browse the list of mainframe-loving sites.
Running Tyrannosaurus Rex Dinos are not dead. They are alive and well and living in data centers all around you. They speak in tongues and work strange magics with computers. Beware the dino! And just in case you're waiting for the final demise of these dino's: remember that dinos ruled the world for 155-million years!
Dinos and other anachronisms
[ Join Now | Ring Hub | Random | << Prev | Next >> ]
 

Below you find the logo of our sponsor and logos of the web-standards that this page adheres to.