Slide 5.3: Intrinsic data types
Slide 5.5: Data definition statements (cont.)
Home

Data Definition Statements

        X      SWORD    -20h
        Y      BYTE     10101010b, 'A', 10
               SBYTE    ?
A data definition statement sets aside storage in memory for a variable and may assign a name to the variable. Each data definition has the syntax:
  [ name ]  directive  initializer  [, initializer ] ...
Name
A variable name is a label that marks the offset of a variable from the beginning of its enclosing segment. For example, suppose that X was located at offset 0 in the data segment and consumed 2 bytes of storage. Then Y would be located at offset 2.