VMS Help  —  MACRO  /ALPHA  Directives  .ENABLE  Examples
      Example 1
      The following example shows the ALIGN_DATA option:

        .PSECT A, NOEXE
        .ENABLE ALIGN_DATA  ; Align on natural
                            ; natural boundaries
        A: .BYTE 1          ;
        B: .QUAD 1000       ; B is allocated at
                            ; a natural boundary -
                            ; specifically at A + 7
        .DISABLE ALIGN_DATA ;
        C: .BYTE 2          ;
        D: .QUAD 1001       ; D is allocated at
                            ; an unaligned boundary -
                            ; specifically C + 1
      Example 2
      The following example shows the GLOBAL option disabled:

        .DISABLE GLOBAL
        .ADDRESS X         ; Assembler issues a warning
        .END
      Example 3
      The following example shows the LOCAL_BLOCK option enabled:

              .ENABLE LOCAL_BLOCK

              .PSECT A,NOEXE
        A1::
        5$:   .PROCEDURE_DESCRIPTOR PROC_1   ; Temporary label 5$
              .blkb 32
        A2::
              .address 5$         ; By default the declaration
                                  ; of A2 would have ended the
                                  ; temporary label block and
                                  ; made this reference to 5$
                                  ; illegal.  However, this default
                                  ; behavior has been overridden
                                  ; by the use of .ENABLE LOCAL_BLOCK.

              .DISABLE LOCAL_BLOCK
              .END
      Example 4
      The following example shows an unoptimized and optimized list
      of instructions with the SCHEDULE and PEEPHOLE options enabled:

        .ENABLE PEEPHOLE,SCHEDULE
        .psect A,EXE,QUAD     ; unoptimized
        TRAPB
        A::ADDF F1,F2,F3
           ADDF F4,F5,F6
           ADDL R1,R2,R3
           ADDL R4,R5,R6

      This example shows the optimized list of instructions:

        .ENABLE PEEPHOLE,SCHEDULE
        .psect A,EXE,QUAD     ; optimized
        A::ADDF F1,F2,F3
           ADDL R1,R2,R3
           ADDF F4,F5,F6
           ADDL R4,R5,R6

      The following example shows a repeat block that initializes
      a block of 1000 longwords to the values of 0 through 999. The
      .DISABLE PREPROCESSOR_OUTPUT directive suppresses from the
      preprocessor output file those statements that are incompatible
      with the OSF/1 Assembler.

        .DISABLE PREPROCESSOR_OUTPUT
         I=0
        .REPEAT 1000
           .ENABLE PREPROCESSOR_OUTPUT
           .LONG %INTEGER(I)
           .DISABLE PREPROCESSOR_OUTPUT
           I = I + 1
        .ENDR
Close Help