#SPM-assembly output processing

Use this macro to control the printing of the following:

  • Nesting-level indication
  • Link-label indication (#@LBnn)
  • Structured programming macro (SPM) expansions.

Format

Read syntax diagramSkip visual syntax diagram#SPM,LEVEL= YESLEVEL=NOPOPPRINT= NOMODPRINT=GENNOGENPOP
LEVEL
controls the printing of assembler messages that indicate the nesting level and link labels, where:
YES
prints the assembler messages.
NO
does not print the assembler messages.
POP
restores the assembler message printing to the state that was set before the previous #SPM macro with the LEVEL parameter.
PRINT
controls the printing of the SPM macro expansions, where:
GEN
prints the macro expansions.
NOGEN
does not print the macro expansions.
NOMOD
cancels any previous #SPM PRINT=GEN or #SPM PRINT=NOGEN statement.
POP
restores the macro expansion printing to the state that was set before the previous #SPM macro with the PRINT parameter.

Entry requirements

None.

Return conditions

Control is returned to the next sequential instruction.

Programming considerations

  • All SPM conditional expressions can be no more than 128 characters long. Any additional characters are truncated.

Examples

  • The following is an example of the PRINT parameter. #SPM PRINT=GEN

    When PRINT=GEN is coded, each SPM (except #) generates the following code at the beginning of the macro.

            PUSH  PRINT
             PRINT GEN

    The following code is generated at the end of each macro:

    POP PRINT
  • The following example shows how the nesting levels, link labels, and macro expansions are printed.
                 #SPM  PRINT=GEN,LEVEL=YES
                  #DO   WHILE=(CR,R2,EQ,R3),PREFIX=AAAA
        +         PUSH  PRINT
        +         PRINT GEN
        +AAAA3    EQU   *
        +         CR    R2,R3
        +         BC    15-8,AAAA2
        +*,1
        +         POP   PRINT
                     #DO   WHILE=(CR,R3,EQ,R4)
        +         PUSH  PRINT
        +         PRINT GEN
        +#@LB9    EQU   *
        +         CR    R3,R4
        +         BC    15-8,#@LB8
        +*,2
        +         POP   PRINT
                        #IF   ICM,R2,7,EBW000,NZ
        +         PUSH  PRINT
        +         PRINT GEN
        +         ICM   R2,7,EBW000
        +         BC    15-7,#@LB14             BR FALSE TO #ELSE OR #EIF
        +*,3
        +         POP   PRINT
                           LA  R4,0
                        #EIF
        +         PUSH  PRINT
        +         PRINT GEN
        +#@LB14     EQU   *
        +*,2
        +         POP   PRINT
                     #EDO
        +         PUSH  PRINT
        +         PRINT GEN
        +         BC    15,#@LB9
        +#@LB8        EQU   *
        +         POP   PRINT
        +         PUSH  PRINT
        +         PRINT GEN
        +*,1
        +         POP   PRINT
                     LA  R0,0
                  #EDO
        +         PUSH  PRINT
        +         PRINT GEN