Slide 5.9: Defining WORD and SWORD data
Slide 5.11: Little endian order
Home

Defining Other Data

dword1  SDWORD  -12345678h
   ; signed
dword2  DWORD   10  DUP(?) 
   ; unsigned array
Type Usage
DWORD 32-bit unsigned integer
SDWORD 32-bit signed integer

Defining QWORD Data
qword1 QWORD 123456789ABCDEFh
; integer constant
Type Usage
QWORD 64-bit integer

Defining TBYTE Data
tbyte1 TBYTE 0123456789ABCDEFh
; integer constant
Type Usage
TBYTE 80-bit integer

Defining Real Number Data
REAL4 defines a 4-byte single-precision real variable. REAL8 defines an 8-byte double-precision real, and REAL10 defines a 10-byte double extended-precision real.
rVal1   REAL4   2.5
rVal2   REAL4   -80000.21
rVal3   REAL8   1.024E+04
rVal4   REAL10  3.3455E-39
rArray  REAL4   10  DUP(0.0)
Type Usage
REAL4 32-bit (4 bytes) IEEE short real
REAL8 64-bit (8 bytes) IEEE long real
REAL10 80-bit (10 bytes) IEEE extended real

A decimal real number consists of a mantissa and an optional exponent. The mantissa contains the sign, integer portion, and fractional portion. For the example of 4-byte IEEE real number, the sign occupies the most significant bit, the exponent fills 8 bits, and the mantissa fills the least significant 23 bits:

Bit Number 31 30   ...   23 22       ...       0
Component Sign Exponent Mantissa
Bit Value 1 11111111 11111111111111111111111