Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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
                                    -♦-