Slide 5.4: Data definition statements Slide 5.6: Defining BYTE and SBYTE data Home |
MSG BYTE 'H', 'e', 'l', 'l', 'o', 0 X SWORD 20h + 20q Y BYTE 10101010b SBYTE ?Each data definition has the same syntax:
[ name ] directive initializer [, initializer ] ...
Directive
Directive | Usage | Directive | Usage | Directive | Usage | ||
---|---|---|---|---|---|---|---|
DB |
8-bit integer | DD |
32-bit integer or real | DT |
80-bit tenbyte | ||
DW |
16-bit integer | DQ |
64-bit integer or real | |
1+2*3
, 4/(3-1)
, or 5 MOD 2
.
Operators | Name | Precedence Level | Example |
---|---|---|---|
( ) |
parentheses | 1 (highest) | (1 + 2) * 3 |
+, – |
unary plus, minus | 2 | -10 + +20 |
*, / |
multiply, divide | 3 | 3 * 4 / 5 |
MOD |
modulus | 3 | 10 MOD 3 |
+, – |
add, subtract | 4 (lowest) | 10h + 10b - 10d |