Hybridoma Technology ( Production , Purification , and Application )
SAQIB ALI.pptx
1. University Of Lucknow
Computer Architecture And Microprocessor
Submitted By
Saqib Ali
Bsc Semester 5
Roll No - 200014025496
Submitted To
Dr Puneet Misra
( Assistant Professor )
Presentation
3. Register Organization Of 8086
The 8086 Registers Are Classified Into Following Types :
1.General Purpose Registers
2.Segment Registers
3.Pointers and Index Registers
4.Flag Register
6. : This is the accumulator. It is of 16 bits and is divided into two 8-bit
registers AH and AL to also perform 8-bit instructions. It is generally
used for arithmetical and logical instructions but in 8086
microprocessor it is not mandatory to have an accumulator as the
destination operand
AX
There are eight general purpose register in 8086 microprocessor
which are explained below:-
This is the base register. It is of 16 bits and is divided into two 8-bit
registers BH and BL to also perform 8-bit instructions. It is used to
store the value of the offset
BX:
7. This is the counter register. It is of 16 bits and is divided into two
8-bit registers CH and CL to also perform 8-bit instructions. It is
used in looping and rotation
CX:
This is the data register. It is of 16 bits and is divided into two 8-bit
registers DH and DL to also perform 8-bit instructions. It is used in
the multiplication and input/output port addressing.
DX:
This is the stack pointer. It is of 16 bits. It points to the topmost
item of the stack. If the stack is empty the stack pointer will be
(FFFE)H. Its offset address is relative to the stack segment.
SP:
8. BP: This is the base pointer. It is of 16 bits. It is primarily used in
accessing parameters passed by the stack. Its offset address is relative
to the stack segment.
SI: This is the source index register. It is of 16 bits. It is used in the
pointer addressing of data and as a source in some string-related
operations. Its offset is relative to the data segment.
DI: This is the destination index register. It is of 16 bits. It is used in the
pointer addressing of data and as a destination in some string-related
operations. Its offset is relative to the extra segment.
9. 2.Segment Registers
Segmentation is the process in which the main memory of the
computer is logically divided into different segments and each segment
has its own base address. It is basically used to enhance the speed of
execution of the computer system, so that the processor is able to fetch
and execute the data from the memory easily and fast.
Need For Segmentation
The Bus Interface Unit (BIU) contains four 16 bit special purpose
registers (mentioned below) called as Segment Registers
10. 1:Code segment register (CS)
It is used for addressing memory location in the code segment of
the memory, where the executable program is stored.
2:Data segment register (DS)
It points to the data segment of the memory where the data
is stored.
11. 3:Extra Segment Register (ES)
It also refers to a segment in the memory which is another data
segment in the memory.
4:Stack Segment Register (SS)
It is used for addressing stack segment of the memory. The
stack segment is that segment of memory which is used to
store stack data.
12. 3.Pointers And Index Register
The pointers will always store some address or memory location.
In 8086 Microprocessor, they usually store the offset through
which the actual address is calculated.
1.Instruction Pointer (IP)
The instruction pointer usually stores the address of the next
instruction that is to be executed. Apart from this, it also acts as an
offset for CS register.
13. 2.Base Pointer (BP)
The Base pointer stores the base address of the memory. Also,
it acts as an offset for Stack Segment (SS).
3.Stack Pointer (SP)
The Stack Pointer Points at the current top value of the Stack.
Like the BP, it also acts as an offset to the Stack Segment (SS).
The indexes are used with the extra segment and they usually
are used for copying the contents of a particular block of
memory to a new location.
14. 4.Source Index (SI)
It stores the offset address of the source
5.Destination Index (DI):
It stores the offset address of the Destination.
Stack Pointer
Base Pointer
Source Index
Destination Index
Instruction Pointer
15. 4.Flag Register
Flag register is one of the special purpose registers. The Flag Register
is a 16-bit register and there are only 9 accessible flags on the 8086
microprocessors. Therefore the remaining 7 bits are idle.
16. There are two categories of flag register:
1.Condition Flags
2.Control Flags
The conditional flags are set or reset after any arithmetic
or logical operation is performed on an 8 bit or 16-bit
number. This category consists of the following 6 flags:
1) Condition Flags
17. i.Carry Flag (CF): The carry flag will be set only if a carry
is generated from the MSB of the result after doing any
operation in 8086 Microprocessor.
ii. Parity Flag (PF): Parity is related to the number of 1’s
contained in the binary data. There exist two types of
parity:
•Even Parity: When the number of 1’s in the binary data
are even.
•Odd Parity: When the number of 1’s in the binary data
are odd.
18. iii. Auxiliary-Carry Flag (AF): This flag is set if there is
a generation of carrying from a nibble, i.e. 4 bits of
data.
iv. Zero Flag (ZF): If the result after performing the
required operation (Arithmetic or Logical) on the
instructions is zero, in that case, the zero flags are set to 1.
Else, it remains reset.
19. V. Sign Flag (SF): If the result after performing any
arithmetic or logic operation in the given instruction is
negative, then the sign flag is set to 1. Else, for a positive
result, the sign flag remains reset.
Vi. Overflow Flag (OF): This Flag will be set if the
register gets overflowed with data after any arithmetic or
logic operation. This happens in cases when the carry is
getting in in MSB, but there is no space in the register to
store the carried out bit.
20. The control flags are used to navigate the
microprocessor for certain operations. There are 3 types
of control flags:
2) Control Flags
i.Trap Flag (TF): This flag is used of we need single-step
debugging in our code. If the TF is set, then the
execution will be done step by step. Otherwise, the free-
running operation will be done.
21. ii. Interrupt Flag (IF): This flag is used to enable the
Interrupt. The microprocessor is capable of handling
interrupts only if this flag is in the set mode. Otherwise,
any interrupt raised while the execution of the
instructions will not be handled by the microprocessor.
iii. Direction Flag (DF): This flag is used for string
operations. If this flag is set, the string will be read from
higher-order bits to lower order bits and vice versa.