bdfs1m14 | Structured Programming Macros |
Use this macro to generate inline code to increment or decrement 1 or more
registers.
Format
- reg
- is a register that contains the value to be incremented or
decremented. You can specify as many as 10 registers.
- number
- is the amount by which to increment or decrement the specified
value. If you specify a positive number, the value in the specified
register will be incremented. If you specify a negative number, the
value in the specified register will be decremented.
- type/label
- specifies the amount by which to increment or decrement the specified
value, where label is the label of a location that contains the
amount and is prefixed by one of the following:
- A/label
- specifies a 4-byte address contained at location label.
- F/label
- specifies a fullword starting at location label.
- H/label
- specifies a halfword starting at location label.
- X/label
- specifies a byte starting at location label.
- I/label
- specifies a 1-byte equated value.
- P/label
- specifies packed data at location label.
- register
- is a register that contains the amount by which to increment or decrement
the specified value.
Entry Requirements
None.
Return Conditions
- The contents of reg 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.
Examples
- In the following example, registers R0 and R4 are incremented by the
contents of R7.
#STPR R0,R4,R7
- In the following example, registers R0 through R5 are incremented by the
value of the fullword at location EBX000.
#STPR R0,R1,R2,R3,R4,R5,F/EBX000
- In the following example, the specified registers are incremented by the
value of the halfword at location EBX032.
#STPR R0,R4,R14,R2,R5,R3,H/EBX032
- In the following example, registers R7 and R15 are incremented by
12.
#STPR R7,R15,12
- In the following example, registers R0 and R4 are decremented by 4.
#STPR R0,R4,-4
- In the following example, registers R14, R15 and R0 are incremented by the
length of the field GR00ALC.
#STPR R14,R15,R0,L'GR00ALC
Related Macros