User's Manual

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
REGISTER
NAME
AX
,~
I
ADDRESSABLE
OX
(S-BIT
REGISTER
CX
NAMES
SHOWN)
BX
BP
SI
01
SP
15
07
AH
AL
DH
DL
CH
CL
BH
BL
GENERAL
REGISTERS
o
o
SPECIAL
REGISTER
FUNCTIONS
1
MUL
TIPL Y I DIVIDE
1/0
INSTRUCTIONS
LOOP
ISHIFT
I
REPEAT COUNT
}
BASE REGISTERS
})
INDEX
REGISTERS
STACK POINTER
CS
OS
SS
ES
15
o
CODE SEGMENT SELECTOR
1-------1
DATA SEGMENT SELECTOR
STACK
SEGMENT SELECTOR
t-------f
EXTRA SEGMENT SELECTOR
SEGMENT REGISTERS
15
0
F§FLAGS
IP
INSTRUCTION POINTER
MSW·
MACHINE STATUS WORD
STATUS
AND CONTROL
REGISTERS
G3010B
Figure 2-4.
80286
Base Architecture Register Set
2-7