You are on page 1of 22

Computer Organization and Assembly Language

History of Intel
Microprocessor

Ø

The 4-bit Microprocessors
v

Ø

Intel released the world’s first µp in 1971.
The 4004 is a 4-bit µp with maximum
memory of only up to 4,096 4-bit memory
locations (2,048 bytes).

The 8-bit Microprocessors

v

In 1972, Intel released the 8008 which is an
8-bit µp capable of addressing 16,384 bytes
and has 48 instructions.
In 1973, Intel released the 8080.

v

In 1977, the 8085 was released.

v

8088-8086 Architecture

* Property of STI
Page 1 of 22

Computer Organization and Assembly Language

The 16-bit Microprocessors

Ø

Ø

In 1978, Intel released the 8086 µp and a
year later the 8088. Both are 16-bit µp’s
and can execute instructions in as little as
400 ns.
These 16-bit microprocessors have
multiplication and division instructions.

8088-8086 Architecture

* Property of STI
Page 2 of 22

Computer Organization and Assembly Language

Basic 8088/8086 Architecture

EU

BIU

Register
Array

Segment
Register and
IP

Bus
Controller

ALU & CU
IR

8088-8086 Architecture

Prefetch
Queue

* Property of STI
Page 3 of 22

Computer Organization and Assembly Language

8088/8086 Bus Structure

8086
System

8088
System

Address Bus

A0 to A19

Data Bus

D0 to D15

Control Bus

RD, WR, M/IO

Address Bus

A0 to A19

Data Bus

D0 to D7

Control Bus

8088-8086 Architecture

To
Memory
and I/O

To
Memory
and I/O

RD, WR, IO/M

* Property of STI
Page 4 of 22

Computer Organization and Assembly Language

Logical Memory

FFFFFH
FFFFEH
FFFFDH
1M
Bytes

8086/8088
Logical
Memory Map

00002H
00001H
00000H

8088-8086 Architecture

* Property of STI
Page 5 of 22

Computer Organization and Assembly Language

Physical Memory

Odd Bank

Even Bank

FFFFFH

FFFFEH
FFFFCH
FFFFAH

FFFFDH
FFFFBH
512 K
Bytes

512 K
Bytes

00005H

00004H

00003H
00001H

00002H
00000H

16 bits

8088-8086 Architecture

* Property of STI
Page 6 of 22

Computer Organization and Assembly Language

Dedicated and General Use
of Memory

Ø

00000H to 00013H - dedicated

Ø

00014H to 0007FH - reserved

Ø

FFFF0H to FFFFBH - dedicated for
functions

Ø

FFFFCH to FFFFFH - reserved for use

8088-8086 Architecture

* Property of STI
Page 7 of 22

Computer
Systems
Organization
Computer Organization
and
Assembly
Language

Register Structure of the
8086/8088

8 Bits

8 Bits

AH
BH

AL
BL

AX
BX

Accumulator
Base

CH
DH

CL
DL

CX
DX

Count
Data

SP

Stack Pointer

BP
SI

Base Pointer
Source Index

DI
IP

Destination Index
Instruction Pointer

CS

Code Segment

DS

Data Segment

SS

Stack Segment

ES

Extra Segment

General
Purpose
Register

Pointer and
Index
Registers

Segment
Registers

Flags
16 Bits

8088-8086 Architecture

* Property of STI
Page 8 of 22

Computer Organization and Assembly Language

General Purpose Registers

Ø

General Purpose Registers. These are
used in any manner that the programmer
wishes. Each is addressable as a:
16-bit register (AX, BX, CX, DX) or

Ø

Two 8-bit registers (AH, AL, BH, BL, CH,
CL, DH, and DL).

8088-8086 Architecture

* Property of STI
Page 9 of 22

Computer Organization and Assembly Language

Pointer and Index Registers

Ø

Pointer and Index Registers. Although
the pointer and index registers are also
general purpose in nature, they are more
often used to index or point to the memory
location holding the operand data for many
instructions.
v
v
v
v

SP (Stack Pointer)
BP (Base Pointer )
SI (Source Index )
DI (Destination Index)

8088-8086 Architecture

* Property of STI
Page 10 of 22

Computer Organization and Assembly Language

Status Register or Processor
Status Word

Ø

Status Register or Processor Status
Word. This contains 16 bits, but 7 of them
are not used. Each bit in the PSW is a
flag.

Ø

These flags are divided into the
conditional flags and the control flags.

8088-8086 Architecture

* Property of STI
Page 11 of 22

Computer Organization and Assembly Language

Status Register or Processor
Status Word

Ø

Conditional Flags
v
v
v
v
v
v

Sign Flag (SF) - b7
Zero Flag (ZF) - b6
Parity Flag (PF) - b2
Carry Flag (CF) - b0
Overflow Flag (OF) - b11
Auxiliary Carry Flag (AF) - b4

8088-8086 Architecture

* Property of STI
Page 12 of 22

Computer Organization and Assembly Language

Example 1
Perform the indicated operation and
determine the state of the conditional flags.
1.)
+

0010 0011 0100 0101
0011 0010 0001 1001
0101 0101 0101 1110

2.)
0101 0100 0011 1001
+ 0100 0101 0110 1010
1001 1001 1010 0011

8088-8086 Architecture

* Property of STI
Page 13 of 22

Computer Organization and Assembly Language

Example 2
Perform the indicated operation and
determine the state of the conditional flags.
1.)
-

0101 0100 0011 1001
0100 0101 0110 1010
1001 1001 1010 0011

-

0001 0010 0011 0100
0100 1010 1110 0000
1100 0111 0101 0100

2.)

8088-8086 Architecture

* Property of STI
Page 14 of 22

Computer Organization and Assembly Language

Example 3

Perform the following arithmetic operation and
determine the state of the conditional flags.
1.)
2.)

70A3H – E757H
FE58H + 01A8H

8088-8086 Architecture

* Property of STI
Page 15 of 22

Computer Organization and Assembly Language

Exercises

Perform the following arithmetic operation and
determine the state of the conditional flags.
1.)
2.)
3.)

AA45H – 4678H
234FH + 34CDH

+

0110 0010 1010 0000
1001 1101 0110 0000
0000 0000 0000 0000

8088-8086 Architecture

* Property of STI
Page 16 of 22

Computer Organization and Assembly Language

Status Register or Processor
Status Word

The control flags are:
v
v
v

Direction Flag (DF) - b10
Interrupt Enable Flag (IF) - b9
Trap Flag (TF) - b8

8088-8086 Architecture

* Property of STI
Page 17 of 22

Computer Organization and Assembly Language

Segment Registers and
Memory Segmentation

Ø

The MM can be partitioned into 64 K
(65,536) byte segments where each
segment represents an independently
addressable unit of memory consisting of
64 K consecutive byte-wide storage
locations.

64 KB
Segment

Base Address

8088-8086 Architecture

* Property of STI
Page 18 of 22

Computer Organization and Assembly Language

Generating a Memory
Address

Ø

A logical address in the 8086/8088 is
identified by a segment (its base address)
and an offset.

.
.
.
Data
Offset

64 KB
Segment

.
.
.

Base Address

8088-8086 Architecture

* Property of STI
Page 19 of 22

Computer Organization and Assembly Language

Example 1

Segment Base Address = 1234H Offset
Address
= 0022H
Computing for the physical address:
Physical Segment Base Address = 2340H
+ Offset Address
= 0022H
Physical Address
= 12362H

8088-8086 Architecture

* Property of STI
Page 20 of 22

Computer Organization and Assembly Language

Example 2

Segment Base Address = 123AH
Offset Address
= 341BH

Computing for the physical address:
Physical Segment Base Address = 123A0H
+ Offset Address
= 341BH
Physical Address
= 157BBH

8088-8086 Architecture

* Property of STI
Page 21 of 22

Computer Organization and Assembly Language

Exercise

Determine the physical address of the
following addresses:
1. Segment Base Address = 4321H
Address = 1266H

Offset

2. Segment Base Address = ABCDH Offset
Address = 3623H
3. Segment Base Address = AE6DH
Address = 43A1H

8088-8086 Architecture

Offset

* Property of STI
Page 22 of 22