Microprocessor LEC06 121116 part 1.pdf, Lecture notes of Microprocessors

Microprocessor LEC06 121116 part 1.pdf

Typology: Lecture notes

2016/2017

Uploaded on 11/03/2017

hossam-elmaghraby
hossam-elmaghraby 🇪🇬

2 documents

1 / 28

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MICROPROCESSORS
EEC 2103
Dr. Usama Tharwat
DR.USAMA_THARWAT@YAHOO.COM
Second Year (2016-2017)I LEC06 121116
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Microprocessor LEC06 121116 part 1.pdf and more Lecture notes Microprocessors in PDF only on Docsity!

MICROPROCESSORS

EEC 2103

Dr. Usama Tharwat

[email protected]

Second Year (2016-2017)I – LEC06 121116

1

Microarchitecture of the 8088/8086 Microprocessor

2

Software Model of the 8088/8086 Microprocessor

13 16-bit internal registers:

  • Instruction Pointer (IP)
  • 4 data registers: AX, BX, CX, DX
  • 2 pointer registers:

BP and SP

  • 2 index registers: SI and Di
  • 4 segment registers CS, DS, SS, and ES

Status or Flag register SR Nine of its bits implemented as status and control flags

4

Software Model of the 8088/8086 Microprocessor

 The architecture implements independent memory and input/output address spaces.

 Notice that the memory address space is 1,048,576 bytes (l M byte) in length

 and the I/O address space is 65,536 bytes (64 K byte) in length.

5

Segmentation in 8086

7

Segmentation in 8086

Segment Size = 64KB

Maximum number of segments possible = 16

Logical Address – 16 bits

Physical Address – 20 bits

2 Logical Addresses for each Segments.

  • Base Address (16 bits)
  • Offset Address (16 bits) Segment registers are used to store the Base address of the segment.

8

Segmentation in 8086

10

Segmentation in 8086

 The BIU has a dedicated adder for determining physical memory addresses.

Physical Address (20 Bits)

Adder

Segment Register (16 bits) 0 0 0 0

Offset Value (16 bits)

11

8086 Registers

1- Data Group Registers

- Four 16-bit data registers

AX, BX, CX and DX

- Each register can be divided into two

parts (higher and lower part to store

8 bit data).

13

8086 Registers

1- Data Group Registers

General registers are used for temporary storage and manipulation of data and instructions

Accumulator register (AX) 16 bits (AH= 8 bits & AL= 8bits)

It serves as a primary accumulator. All input/output operations are performed through this register. Additionally, string and arithmetic instructions make use of this register.

Base register (BX) 16 bits (BH= 8 bits & BL= 8bits)

It serves as the base register. This is the only general purpose register which is used in the calculation of the 8086 data memory address and in this case, the DS register is taken as the default segment register.

14

8086 Registers

2- Pointer and Index Group Registers

There are two 16-bit pointer registers. Similarly, there are two index registers. These four registers can be used as general purpose registers in arithmetic and logic operations.

Pointer Registers

Stack Pointer (SP) 16 bits

SP points to the top of the stack. It is used for stack operations

Base Pointer (BP) 16 bits

BP can also be used as the base register for accessing the stack memory and in this case the stack segment (SS) register becomes the default segment register.

16

8086 Registers

2- Pointer and Index Group Registers

 There are two 16-bit pointer registers. Similarly, there are two index registers. These four registers can be used as general purpose registers in arithmetic and logic operations.

Index Registers The index registers are very useful in array processing and string operations. In string operations, the register uses the Extra Segment (ES) as the default segment register.

Source Index Register (SI) 16 bits SI points to the source string.

Destination Index Register (DI) 16 bits DI points to the destination string.

17

8086 Registers

3- Segment Registers

The 8086 memory space is segmented into blocks of 64K memory. Each block is specified by a segment register. There are 4 segment registers. The segment registers are used in conjunction with the pointer and index registers to store and retrieve items from the memory space.

19

8086 Registers

3- Segment Registers

Code Segment Register (CS) 16 bits

CS points to the area of memory where the code is stored.

Data Segment Register (DS) 16 bits

DS points to the area of memory where the data is stored.

Extra Segment Register (ES) 16 bits

ES points to where ever the user wants it to point

Stack Segment Register (SS) 16 bits

SS points to the area of memory where the processor temporarily stores register values in case they get messed up.

20