[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DUP              Duplicate Occurrences                          MASM Operator

  count DUP (initialvalue,,,)

    Used with DB, DW, DD, DQ, and DT to specify multiple instances of
    initial values.

       Notes:     InitialValue can be one or more items, each separated by
                  a comma.  Each initialValue can be any expression that
                  evaluates into an integer value, a character constant,
                  or another DUP operator.  Note that initialValue MUST be
                  enclosed within parenthesis.

       Count is the number of times to duplicate the initial values.

  -------------------------------- Example ---------------------------------

   DB   200  DUP (1)           ;Define 200 bytes initialized to 1
   DB   50   DUP (1,0)         ;Define 100 bytes of the pattern 1,0,1,0,etc.
   DB   2    DUP (3 DUP (1))   ;Define 6 bytes initialized to 1

See Also: DB DW DD DQ DT
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson