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.
Iterative Macro
 Example                                   Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   FOR parameter[:REQ│:=default], <argument [,argument]...>
              statements
            ENDM
 
  See also: ENDM, EXITM, FORC, REPEAT, WHILE, MASM 5.1 Compatibility
 
  Description:
 
     Repeats <statements> once for each argument specified. The current
     argument replaces <parameter> in each iteration. IRP is a synonym
     for FOR and is included for compatibility with previous versions
     of the assembler.
 
     Parameter      Description
 
     parameter      A valid symbol name. If parameter appears in
                    statements, it is replaced by a different argument
                    in each iteration.
 
     :REQ           Optional tag for <parameter> causing an assembler
                    error if <parameter> is given a blank argument.
 
     :=default      Optional tag for <parameter> causing <parameter> to
                    be assigned <default> if given a blank argument.
 
     argument       Text, symbol, string, or numeric constant. Separate
                    multiple iterations with commas. Angle brackets are
                    required if a string <argument> includes spaces or
                    commas. Leading spaces of string arguments are
                    ignored.
 
     statements     Any valid assembler statements.
                                    -♦-