Defines a Typedef-TypeName that is an alias for another type declaration.
Syntax
TypeName TYPEDEF Type-Declaration
Remarks
The TypeName entry is a unique globally-scoped Identifier that must be specified. Upon successful processing of the TYPEDEF directive, the TypeName entry is converted to a Typedef-TypeName which can then be used in expressions or as a directive in data allocation statements.
The TYPEDEF directive can be used to create a direct alias for another intrinsic type (a Scalar-TypeName, Record-TypeName, Structure-TypeName, Union-TypeName, or other Typedef-TypeName), a pointer to another type, or it can be used to create vector types (arrays).
The following are examples of TYPEDEF usage:
CHAR typedef byte ; CHAR is an alias for intrinsic type PCHAR typedef ptr CHAR ; PCHAR is a pointer to CHAR BUFFER_T struct pLetter PCHAR ? ; current position in buffer Letters CHAR "ABCDEF",0 ; array of characters BUFFER_T ends BUFFER typedef BUFFER_T ; alias for intrinsic type PBUFFER typedef ptr BUFFER_T ; pointer to the BUFFER type DATA SEGMENT HexChars BUFFER <> ; allocate structure via typedef pHexChars PBUFFER offset HexChars ; point to the allocated structure DATA ENDS