bdfs1m11 | Structured Programming Macros |
Use this macro to generate inline code to increment or decrement (also
referred to as step) a 1-byte 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 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 byte at EBW033 is incremented
by 10.
#STPC R0,10,EBW033
- In the following example, the value in the byte at EBX008 is decremented
by 4.
#STPC R14,-4,EBX008
Related Macros