HLASM - BSM = Branch and Set Mode

The opcode of the BSM instruction is X'0B'.

Usage

  1. Return to a caller that might be in a differen Amode; typically to return from a routine that was invoked by a BASSM instruction.
  2. Obtain current Amode from the PSW.
  3. Insert current Amode from PSW into an address; typically to modify the return address (usually in register 14) in a glue module that enables programs in Amode 24 or Amode 31 to call routines in a higher Amode.

Arguments

  1. Register to receive the current Amode.
  2. Register holding the destination address.

Function

  1. The processor inserts the current amode in the Amode receiver field: All other bits of the first argument remain unchanged.
  2. The processor switches to the Amode specified in the destination address register and subsequently branches to the address specified in that register. The new Amode is determined as follows:
  3. The condition code does not change.

Special Cases

  1. If the Amode receiver field is in register 0, then the processor skips the first operation.
  2. If the Destination address is in register 0, then the processor will not change Amode, nor will it branch: it will continue with the next sequential instruction instead.

Related Instructions

  1. BASSM expects a return through the BSM instruction.

Hardware

  1. The BSM instruction was introduced with the 370/XA architecture.

Remarks

  1. The PSW's new Amode setting determines how many bits are used for the destination address.
  2. If the new Amode is 64, then the destination address is made even (all instructions have to be on even addresses) by replacing the low-order 1 by a 0 bit.

Examples

         YREGS                          * Define register names
         ...
         BSM   R0,R15                   * Return to caller in correct Amode
         YREGS                          * Define register names
         ...
         L     R15,=V'NEWRTN'           * Point to new routine
         BSM   R14,R15                  * Make rtn bypass us when returning

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.