Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>db define byte masm directive</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson