8086 Registers

8086 Registers



8086 CPU Registers


The 8086 microprocessor has a total of : fourteen registers that are accessible to the programmer.


Eight
of the registers are known as
general purpose registers i.e. they can be used by the programmer for data
manipulation.


Each of the registers is
16 bits long i.e. can contain a 16-bit binary number.


The first four registers are sometimes referred to as
data registers.

They are the ax, bx, cx and dx registers.


The second four are referred to as
index/pointer registers. They are the sp, bp, si and di registers.


The data registers can be treated as 16-bit registers or they can each be treated as two
8-bit registers.


Each 8-bit register can be used independently.


The
ax register may be accessed as ah and al (H and L refer to high-order and low-order bytes).


Similarly


bx may be accessed as bh, blcx may be accessed as ch, cl
dx
may be accessed as dh, dl


If you use a data register as an 8 bit register, you cannot use its 16 bit parent at the same time.


The four
index registers can be used for arithmetic operations but their use is usually concerned with the
memory addressing modes of the 8086 microprocessor which we look at later.


The two remaining registers are the
instruction pointer (ip) and the status word, or flags register.


Neither of these is referenced
directly by your program.Instruction Pointer Register


This is a crucially important register which is used to control which instruction the CPU executes. The ip, orprogram counter, is used to store the memory location of the next instruction to be executed.


The CPU checks the program counter to ascertain which instruction to carry out next. It then updates the
program counter to point to the next instruction.

Thus the program counter will always point to the next
instruction to be executed.


Status (Flags) RegisterNine individual bits of the status register are used as control flags (3 of them) and status flags (6 of them).


The remaining 7 are not used.
A flag can only take on the values 0 and 1. We say a flag is
set if it has the value 1.

The status flags are used to record specific characteristics of arithmetic and of logical instructions.

Example:
The
zero flag (Z-Flag) is set to 1 if the result of an arithmetic operation is zero.
The control flags are used to control certain modes of the CPU.

O-Flag
D-Flag
I-Flag
T-Flag
S-FlagZ-Flag A-Flag P-Flag C-Flag

15 0
Overflow
Direction
Interrupt
Trap
Sign
Zero
Auxilliary
Carry
Parity
Carry

The Flags RegisterThe use and manipulation of the flags register will be discussed in our treatment of 8086 assembly language.




Comments

Popular posts from this blog

SAP NWA: Net Weaver Administration Tool

SAP BASIS Spool Process

SAP BASIS SPOOLING : Printing problems and general issues