Address subtypes
Symbol subtypes describe whether the symbol represents the address of
a byte, a word, and so forth. The following tables show the simple and
complex address subtypes that Turbo Assembler provides:
Simple address subtypes
Type expression Meaning
───────────────────────────────────────────────────────────────────
UNKNOWN Unknown or undetermined address subtype
BYTE Address describes a byte
WORD Address describes a word
DWORD Address describes a 4-byte quantity
PWORD or FWORD Address describes a 6-byte quantity
QWORD Address describes an 8-byte quantity
TBYTE Address describes a 10-byte quantity
SHORT Address describes a short label/procedure address
NEAR Address describes a near label/procedure address
FAR Address describes a far label/procedure address
PROC Address describes either a near or far label/
procedure address, depending on the currently
selected programming model (memory model)
DATAPTR Address describes either a word, dword, or pword
quantity, depending on the currently selected
programming model
CODEPTR Address describes either a word, dword, or pword
quantity, depending on the currently selected
programming model
strucname/unionname Address describes an instance of the named structure
or union
tablename Address describes an instance of the named table
recordname Address describes an instance of the named record;
either a byte, word, or dword quantity
enumname Address describes an instance of the named enumerated
data type; either a byte, word, or dword quantity
typename Address describes an instance of the named type
(cf. TYPEDEF directive)
TYPE expression Address describes an item whose subtype is the
address subtype of the expression (Ideal mode only)
proctypename Address describes procedure of proctype (cf. PROCTYPE
directive)
───────────────────────────────────────────────────────────────────────────
Complex address subtypes
Several directives (e.g. ARG, LOCAL) let you declare and use complex
address subtypes. These type expressions are similar to C in that they
can represent multiple levels of pointer indirection, for example, the
complex type expression
PTR WORD
represents a pointer to a word. (The size of the pointer depends on
the segmentation model you selected with the MODEL directive.) The
following table shows a syntax summary of complex address subtypes:
Syntax Meaning
───────────────────────────────────────────────────────────────────────
simple_address_subtype The specified address subtype
[distance] PTR [complex_address_subtype] A pointer to the specified
complex address subtype, the
size of which is determined
by the current MODEL or by
the specified distance, if
present
You can describe the optional distance parameter in the following ways:
Syntax Meaning
───────────────────────────────────────────────────────────────────────
NEAR Use a near pointer; can be either 16 or 32 bits,
depending on the current MODEL
FAR Use a far pointer; can be either 32 or 48 bits,
depending on the current MODEL
SMALL NEAR Use a 16-bit pointer; ≥80386 only
LARGE NEAR Use a 32-bit near pointer; ≥80386 only
SMALL FAR Use a 32-bit far pointer; ≥80386 only
LARGE FAR Use a 48-bit far pointer; ≥80386 only
The type of the object being pointed to is not strictly required in
complex pointer types; Turbo Assembler only needs to know the size of
the type. Therefore, forward references are permitted in complex pointer
types (but not in simple types).