Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
WordStore
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* WordStore - Macro to define a series of word storage locations with
;* labels consisting of a name followed by a sequential number.  Each
;* defined word is initialized to 0.
;*
;* Shows:   Directive - REPT
;*          Operators - &     %
;*
;* Params:  slabel - Base name for labels
;*          s1 - Starting number for labels
;*          s2 - Ending number for labels
 
WordStore MACRO slabel, s1, s2
    maxct = s2 - s1 + 1                 ;; Determine number of locations
    count = s1                          ;; Begin with first number
    REPT maxct
        lbl CATSTR <&slabel>, %count    ;; Create label.  The % operator
        count = count + 1               ;;   forces evaluation of count
        lbl DW 0                        ;; Create word storage location
    ENDM                                ;; Terminator for REPT
ENDM                                    ;; Terminator for MACRO
                                    -♦-