#STPC: Step a byte or character

Use this macro to generate inline code to increment or decrement (also referred to as step) a 1-byte value at a specified location.

Last updated

  • Changed for PUT11.
  • Changed for PUT07.
  • Changed for PUT05.
  • Changed for PUT00.

Format

Read syntax diagramSkip visual syntax diagram#STPC reg1,number ,location
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

  • If AMODE=64 is coded on the BEGIN macro, all 8 bytes of a register are used.
  • For information about macro register conventions, see Assembler program register conventions.
  • 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