inter

80286 BASE ARCHITECTURE

2.3 REGISTERS

The 80286 contains a total of fourteen registers that are of interest to the application programmer. (Five additional registers used by system programmers are covered in section 10.1.) As shown in figure 2-4, these registers may be grouped into four basic categories:

General registers. These eight 16-bit general-purpos~registers are used primarily to contain operands for arithmetic and logical operations.

Segment registers. These four special-purpose registers determine, at any given time, which segments of memory are currently addressable.

Status and Control registers. These three special-purpose registers are used to record and alter certain aspects of the 80286 processor state.

2.3.1 General Registers

The general registers of the 80286 are the 16-bit registers AX, BX, CX, DX, SP, BP, SI, and DI. These registers are used interchangeably to contain the operands of logical and arithmetic operations.

Some instructions and addressing modes (see section 2.4), however, dedicate certain general registers to specific uses. BX and BP are often used to contain the base address of data structures in memory (for example, the starting address of an array); for this reason, they are often referred to as the base registers. Similarly, SI and D1 are often used to contain an index value that will be incremented to step through a data structure; these two registers are called the index registers. Finally, SP and BP are used for stack manipulation. Both SP and BP normally contain offsets into the current stack. SP gener- ally contains the offset of the top of the stack and BP contains the offset or base address of the current

 

16-BIT

 

 

 

SPECIAL

 

 

 

(S-BIT REGISTER

 

 

 

REGISTER

 

 

 

 

NAME

 

 

 

FUNCTIONS

 

 

 

,~

 

 

07

o

 

 

15

o

AX

AH

AL

 

 

CS

 

CODE SEGMENT SELECTOR

ADDRESSABLE

 

 

 

MULTIPLYI DIVIDE

 

1 ------- 1

OX

DH

DL

1/0 INSTRUCTIONS

OS

 

DATA SEGMENT SELECTOR

 

1

 

 

REGISTER

CX

CH

CL

LOOP ISHIFTI

SS

 

STACK SEGMENT SELECTOR

REPEAT COUNT

 

NAMES

 

 

 

 

 

t ------- f

SHOWN)

 

 

 

 

 

 

BX

BH

BL

}BASE REGISTERS

ES

 

EXTRA SEGMENT SELECTOR

 

BP

 

 

 

SEGMENT REGISTERS

 

 

SI

 

 

 

 

 

15

0

 

 

 

 

 

 

 

 

01

 

 

}) INDEX REGISTERS

 

 

 

 

 

 

 

 

F§FLAGS

 

 

 

 

 

 

 

SP

 

 

STACK POINTER

IP

 

INSTRUCTION POINTER

 

15

 

 

o

 

MSW·

MACHINE STATUS WORD

 

 

 

GENERAL

 

 

 

 

 

REGISTERS

STATUS AND CONTROL

 

REGISTERS

 

G3010B

Figure 2-4.80286 Base Architecture Register Set

2-7

Page 33
Image 33
Intel 80286, 80287 manual General Registers