#STPF-step a fullword
Use this macro to generate inline code to increment or decrement a fullword value at a specified location. You can also use this macro to step shared common storage.
Format
- reg1
- is a working register for the macro.
- reg1,reg2
- are a pair of registers used by the Compare and Swap (CS) instruction. See ESA/370 Principles of Operation or ESA/390 Principles of Operation for more information about the CS instruction. Use this form to change the contents of a fullword in shared storage to ensure the field is always updated consistently.
- number
- is the amount by which to increment or decrement the specified value. If you specify a positive number, the value at the specified location will be incremented. If you specify a negative number, the value at the specified location will be decremented.
- location
- is the label of the area that contains the value to be incremented or decremented.
Entry requirements
None.
Return conditions
- The contents of reg1 are overwritten.
- Control is returned to the next sequential instruction.
Programming considerations
- All labels used in the SPM conditional expression can be no more than 32 characters long. Any additional characters are truncated.
- All SPM conditional expressions can be no more than 128 characters long. Any additional characters are truncated.
- In a tightly coupled environment, use care when changing common storage. It is possible that more than one program can change a value at the same time. Use a pair of registers (reg1,reg2) with this macro when changing common storage to avoid this problem.
Examples
- In the following example, the value in the fullword at EBX004 is incremented by 100000.
#STPF R2,100000,EBX004 - In the following example, the value in the fullword at EBX036 is decremented by 760.
#STPF R5,-760,EBX036 - In the following example, the value in the fullword at the shared location called SHARED is
incremented by 20.
#STPF (R2,R3),20,SHARED
