2-13
OVERVIEW OF THE 80C186 FAMILY ARCHITECTURE
Instructions are always fetched from the current code segment. The IP register contains the in-
struction’s offset from the beginning of the segment. Stack instructions always operate on the cur-
rent stack segment. The Stack Pointer (SP) register contains the offset of the top of the stack from
the base of the stack. Most variables (memory operands) are assumed to reside in the current data
segment, but a program can instruct the Bus Interface Unit to override this assumption. Often, the
offset of a memory variable is not directly available and must be calculated at execution time. The
addressing mode specified in the instruction determines how this offset is calculated (see “Ad-
dressing Modes” on page 2-27). The result is called the operand’s Effective Address (EA).
Strings are addressed differently than other variables. The source operand of a string instruction
is assumed to lie in the current data segment. However, the program can use another currently
addressable segment. The operand’s offset is taken from the Source Index (SI) register. The des-
tination operand of a string instruction always resides in the current extra segment. The destina-
tion’s offset is taken from the Destination Index (DI) register. The string instructions
automatically adjust the SI and DI registers as they process the strings one byte or word at a time.
When an instruction designates the Base Pointer (BP) register as a base register, the variable is
assumed to reside in the current stack segment. The BP register provides a convenient way to ac-
cess data on the stack. The BP register can also be used to access data in any other currently ad-
dressable segment.
2.1.9 Dynamically Relocatable Code
The segmented memory structure of the 80C186 Modular Core family allows creation of dynam-
ically relocatable (position-independent) programs. Dynamic relocation allows a multiprogram-
ming or multitasking system to make effective use of available memory. The processor can write
inactive programs to a disk and reallocate the space they occupied to other programs. A disk-res-
ident program can then be read back into available memory locations and restarted whenever it
is needed. If a program needs a large contiguous block of storage and the total amount is available
only in non-adjacent fragments, other program segments can be compacted to free enough con-
tinuous space. This process is illustrated in Figure 2-9.
Table 2-2. Logical Address Sources
Type of Memory Reference
Default
Segment Base
Alternate
Segment Base
Offset
Instruction Fetch
CS
NONE
IP
Stack Operation
SS
NONE
SP
Variable (except following)
DS
CS, ES, SS
Effective Address
String Source
DS
CS, ES, SS
SI
String Destination
ES
NONE
DI
BP Used as Base Register
SS
CS, DS, ES
Effective Address
Summary of Contents for 80C186EA
Page 1: ...80C186EA 80C188EA Microprocessor User s Manual...
Page 2: ...80C186EA 80C188EA Microprocessor User s Manual 1995...
Page 19: ......
Page 20: ...1 Introduction...
Page 21: ......
Page 28: ...2 Overview of the 80C186 Family Architecture...
Page 29: ......
Page 79: ......
Page 80: ...3 Bus Interface Unit...
Page 81: ......
Page 129: ......
Page 130: ...4 Peripheral Control Block...
Page 131: ......
Page 139: ......
Page 140: ...5 ClockGenerationand Power Management...
Page 141: ......
Page 165: ......
Page 166: ...6 Chip Select Unit...
Page 167: ......
Page 190: ...7 Refresh Control Unit...
Page 191: ......
Page 205: ......
Page 206: ...8 Interrupt Control Unit...
Page 207: ......
Page 239: ...INTERRUPT CONTROL UNIT 8 32...
Page 240: ...9 Timer Counter Unit...
Page 241: ......
Page 265: ......
Page 266: ...10 Direct Memory Access Unit...
Page 267: ......
Page 295: ...DIRECT MEMORY ACCESS UNIT 10 28...
Page 296: ...11 Math Coprocessing...
Page 297: ......
Page 314: ...12 ONCE Mode...
Page 315: ......
Page 318: ...A 80C186 Instruction Set Additions and Extensions...
Page 319: ......
Page 330: ...B Input Synchronization...
Page 331: ......
Page 334: ...C Instruction Set Descriptions...
Page 335: ......
Page 383: ...INSTRUCTION SET DESCRIPTIONS C 48...
Page 384: ...D Instruction Set Opcodes and Clock Cycles...
Page 385: ......
Page 408: ...Index...
Page 409: ......