[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DB               Define Byte                                   MASM Directive

  [name]    DB        initialvalue,,,

    Allocates and initializes one or more bytes (8 bits) of storage.  The
    initialvalue argument may be any of the following:

              *     integer (i.e.  12)
              *     string  (i.e.  'message')
              *     constant expression (i.e.  2 * 5)
              *     DUP operator (i.e. 10 DUP (?))
              *     question mark (?) (i.e. 0,1,?,2)

       Notes:     The optional name argument causes the assembler to
                  create a variable whose offset value is equal to the
                  current location counter.  The variable will be of type
                  BYTE.

                  The ? causes the assembler to leave the initial value
                  undefined.  To specify more than 1 initial value,
                  separate them with commas.

                  An initial string value may be of any length, provided
                  it fits on one line. String variables are stored with
                  the first character at a lower memory address than the
                  last character.

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