0% found this document useful (0 votes)
26 views

Lecture #05, Microprocessor

This document discusses the registers of the 8086 microprocessor. It describes the control flags TF, IF, and DF which control single stepping, interrupt enabling, and string direction. It also covers the pointer and index group registers SP, BP, SI, DI which store memory offsets and are used for addressing. The stack pointer SP points to the stack area in memory, while BP is used as a base pointer and SI and DI are used as index registers in string operations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Lecture #05, Microprocessor

This document discusses the registers of the 8086 microprocessor. It describes the control flags TF, IF, and DF which control single stepping, interrupt enabling, and string direction. It also covers the pointer and index group registers SP, BP, SI, DI which store memory offsets and are used for addressing. The stack pointer SP points to the stack area in memory, while BP is used as a base pointer and SI and DI are used as index registers in string operations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

EEE-3103: Microprocessor and Interfacing

Dept. of Electrical and Electronic Engineering


University of Dhaka

Prof. Sazzad M.S. Imran, PhD


sazzadmsi.webnode.com
Registers of 8086

Control Flags of 8086:


TF = 1  processor operates in single stepping mode.
interrupt is recognized, TF flag is cleared.
CPU runs ISS (interrupt service subroutine).
IRET  CPU returns to main program from ISS,
TF flag is restored.

TF = set/reset  push flag register on stack,


change TF as desired,
pop flag register from stack.
Registers of 8086

Control Flags of 8086:


IF = 1  maskable interrupt INTR is enabled.
interrupt is recognized, IF flag is cleared.
IRET in ISS  IF is restored to its original value.
STI = IF set instruction and CLI = IF clear instruction.
When 8086 is reset, IF is cleared.

DF is used in string operations.


STD = DF set instruction and CLD = DF clear instruction.
DF = 1  DI and SI are automatically decremented
access string from highest memory location down to lowest memory location.
Registers of 8086
Pointers and Index Group of Registers:
SP and BP = pointer registers.
SI and DI = index registers.

All 4 are 16-bit registers.


All 4 are used to store offset addresses of memory locations.
MOV AH, [SI] implies,
SI=2000H, then
AHFFH
[SI+1:SI]=ABFFH

SI and DI  used as general purpose registers.


In string instructions,
SI = source index register,
source address = [SI]+[DS]
DI = destination index register,
destination address = [DI]+[ES]
Registers of 8086 The stack is a block of memory that may be
used for temporarily storing the contents of
Pointers and Index Group of Registers: registers inside CPU. • Stack is accessed
by using SP and SS. • Stack is a Top Down
SP  stack pointer. Data Structure whose elements are
contains offset address or stack top address. accessed by using a pointer (SP,SS).

stack address = [SP]+[SS]

BP  base pointer.
used to access data area in stack segment.
stack address = [BP]+[SS]
also used as general purpose register.

IP  instruction pointer.
contains offset address of next instruction to be fetched in BIU.
cannot be programmed by programmer.

You might also like