Most processor and operating-system modes require the use of segmented addresses to access the code and data for MASM applications. The address of the code or data in a segment is relative to an address in a segment register. You can also use pointers to access data in MASM programs.
The first section of this chapter describes how to initialize default segment registers to access near and far addresses. The next section describes how to use the available addressing modes to access the code and data. It also describes the related operators, syntax, and displacements.
The third section of this chapter explains how to use the TYPEDEF directive to declare pointers (variables containing addresses) and the ASSUME directive to give the assembler information about registers containing pointers. This section also shows you how to do typical pointer operations and how to write code that works for pointer variables in any memory model.