INTRODUCTION

memory (Fig. 1-11). The code segment regis- ter points to the base of the program currently running. The stack segment register points to the base of the 8088's stack, the data segment register points to the base of one data area, and the extra segment register points to the base of another area where data can be stored. Each segment register is 16-bits wide, and one of the four is used in the com- putation of every memory address that the 8088 generates.

How are Addresses Generated?

CODE

STACK

DATA

EXTRA

SEGMENT

REGISTERS

Every time the 8088 needs to generate a

 

 

 

memory address, one of the segment registers

CONTENTS OF 8088 SEGMENT REGISTERS

is automatically chosen and added to a logi-

POINT TO THE BASE ADDRESS OF THE

cal address (Fig. 1-12).

CORRESPONDING AREAS IN MEMORY.

 

 

 

For an instruction fetch, the code segment

Figure 1-11. Segment Registers

register is automatically added to the logical

 

 

 

address (in this case the contents of the

 

IMPLICIT

instruction pointer) to compute the value of

SELECTION

CODE

~-S-E-G-M-E-N-T~I

the instruction address.

 

 

 

For an operation referencing the 8088's stack,

STACK

+

DATA

the stack segment register is automatically

 

 

 

added to the logical address (the SP register

EXTRA

 

 

 

 

contents) to compute the value of the stack

SEGMENT

 

20 BIT

address.

REGISTERS

 

PHYSICAL

 

 

 

ADDRESS

For data reference operation, where either

 

 

 

the data or extra segment registers are chosen

Figure 1-12.

Howan Address is Buill

MODULE

MODULE

CODE

STACK

MODULE

SYSTEM

DATA

DATA

Figure 1-10. iAPX 88 Architecture Quick Access to Four Segment Types

1-6

Page 17
Image 17
Intel 210200-002 manual Cal address Fig