bdfs1m13 | Structured Programming Macros |
Use this macro to generate inline code to increment or decrement a halfword
value at a specified location.
Format
- reg1
- is a working register for the macro.
- 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 halfword 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.
- 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 the #STPF macro when updating shared storage to
ensure the field is updated consistently.
Examples
- In the following example, the value in the halfword at EBW002 is
incremented by 300.
#STPH R4,300,EBW002
- In the following example, the value in the halfword at EBW086 is
decremented by 400.
#STPH R7,-400,EBW086
Related Macros