0% found this document useful (0 votes)
4 views63 pages

Chapter_01-Introduction to The Microprocessor and Computer

The document outlines the architecture, programming, and interfacing of various Intel microprocessors, including the 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium series, and Core2 with 64-bit extensions. It provides a historical background of microprocessors, detailing their evolution from the first Intel 4004 to modern processors, highlighting key features and advancements in technology. The course is based on the eighth edition of a textbook by Barry B. Brey, focusing on microprocessor systems and laboratory experiments.

Uploaded by

dualitydsn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views63 pages

Chapter_01-Introduction to The Microprocessor and Computer

The document outlines the architecture, programming, and interfacing of various Intel microprocessors, including the 8086/8088, 80186/80188, 80286, 80386, 80486, Pentium series, and Core2 with 64-bit extensions. It provides a historical background of microprocessors, detailing their evolution from the first Intel 4004 to modern processors, highlighting key features and advancements in technology. The course is based on the eighth edition of a textbook by Barry B. Brey, focusing on microprocessor systems and laboratory experiments.

Uploaded by

dualitydsn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

MICROPROCESSOR

SYSTEMS
The Intel Microprocessors
8086/8088, 80186/80188, 80286, 80386,
80486, Pentium, Pentium Pro Processor,
Pentium II, Pentium III, Pentium 4, and Core2
with 64-Bit Extensions

Architecture, Programming, and Interfacing


Eighth Edition, 2009 (By: BARRY B. BREY)

Mohamed M. Eljhani, Ph.D.


Department of Computer Engineering
University of Tripoli
Spring 2023
The course is based on

The Intel Microprocessors


8086/8088, 80186/80188, 80286, 80386,
80486, Pentium, Pentium Pro Processor,
Pentium II, Pentium III, Pentium 4, and
Core2 with 64-Bit Extensions
Architecture, Programming,
and Interfacing
Eighth Edition, 2009 (By: BARRY B. BREY)
Laboratory Experiments
 32-Bit Microprocessor (Lab-Volt) Kit
Chapter 1
Introduction to the
Microprocessor and
Computer
Chapter Outline
 Historical Background
 The 16-Bit Microprocessor
 The 32-Bit Microprocessor
 Microprocessor-based Computer System
 Memory and I/O Systems
 The Microprocessor
 System Buses
 Basic Computer Architecture

Chapter 1 — Introduction to the Microprocessor and Computer — 5


Microprocessor-based Systems

Chapter 1 — Introduction to the Microprocessor and Computer — 6


Historical Background
 Microprocessor System and Interfacing
 Micro: Extremely small
 Processor: A device that process
set of operations
 System: A set of detailed methods,
procedures and routines
created to carry out a specific
activity, perform a duty, or solve a …..
 Interfacing: A point where two systems meet and
interact

Chapter 1 — Introduction to the Microprocessor and Computer — 7


Historical Background
 CPU / Microprocessor
 The integrated Circuit (IC) chip containing the Central
Processing Unit is called microprocessor

 Entire system including microprocessor, memory and


I/O is called microcomputer

Chapter 1 — Introduction to the Microprocessor and Computer — 8


Historical Background
 The first microprocessor was used by the department
of defense, USA, named as Tomcat

 The first world’s commercially microprocessor was


introduced by Intel (4004)
 2300 transistors

 Speed up to 740 KHz

Chapter 1 — Introduction to the Microprocessor and Computer — 9


Historical Background
 Stored Program concept (machines)
 John von Neumann, program instructions should be
stored in memory unit, just like the data
 Integrated Circuit (IC)
 1958 by Jack Kilby of Texas Instruments
 1960s Digital IC (RTL, register-to-transistor logic)
 INTEL (INTegrated ELectronics): 1968
 4000: family, 1971
 4001: 2K-bit ROM with 4-bit I/O port
 4002: 320-bit RAM with 4-bit output port
 4003: 10-bit serial-in parallel-out shift register
 4004: 4-bit Microprocessor (What is that means ?)
Chapter 1 — Introduction to the Microprocessor and Computer — 10
Historical Background
 Programming Advancements
 Machine language – binary code (0s and 1)
 Assembly language – mnemonic code
(e.g. ADD) : UNIVAC (Universal Automatic Computer)
 High-level Programming Language
 FLOW-MATIC : 1957, by Grace Hopper
 FORTRAN (FORMular TRANslator) : 1957, by IBM
 COBOL (Computer Business Oriented Language)
 RPG (Report Program Generator)
 BASIC, C/C++, PASCAL, ADA
 Visual BASIC
 JAVA, PYTHON …

Chapter 1 — Introduction to the Microprocessor and Computer — 11


Historical Background
 Assembly language
 Assembly language is a low level programming language for
microprocessors and other programmable devices
 With assembly language, a programmer works with
operations that are implemented directly on the physical
CPU
 Assembly languages generally lack high level conveniences,
and they are not portable between various families of
processors
 Have the same structures and set of commands as machine
language, but allow a programmer to use names instead of
numbers
 Assembly (or assembler) language, often abbreviated as
asm (TASM, MASM)
Chapter 1 — Introduction to the Microprocessor and Computer — 12
Historical Background
 The Microprocessor Age

Chapter 1 — Introduction to the Microprocessor and Computer — 13


Historical Background
 First Generation Microprocessors
 4004 (1971, world’s 1st) : 4-bit
 4096 4-bit (nibble / half byte) wide memory,
45 instructions, 50 KIPS
 8008 (1972, extended 8-bit version of 4004,16KB
memory)
 8080 (1973, 1st modern 8-bit, 10 times faster than
8008, 64KB memory)
 8085 (1977, 246 instructions, 769KIPS, internal clock
generator & system controller)
 Intel sold over 100 million copies of 8085

Chapter 1 — Introduction to the Microprocessor and Computer — 14


Historical Background
 Modern Microprocessors
 16-bit : 8086 (1978), 8088 (1979)
 2.5 MIPS, 1MB memory, higher execution speed
and memory
 IBM sold the idea of a Personal Computer (used
Intel’s 8088) : 1981
 16-bit: 80286 (1983): almost identical to 8086 / 8088,
16MB memory, 4 MIPS
 32-bit : 80386 (in 1986), 80486
 64-bit : Pentium / Multicore Processor ..

Chapter 1 — Introduction to the Microprocessor and Computer — 15


Historical Background
 INTEL 4004
 Introduced in 1971
 It was the first microprocessor made by Intel
 It was a 4 bit µP
 Its clock speed was 740KHz
 It has 2,300 transistors
 It could execute around 60 KIPS
 INTEL 4040
 Introduced in 1974
 It was also 4 bit µP

Chapter 1 — Introduction to the Microprocessor and Computer — 16


Historical Background
 INTEL 8008
 Introduced in 1972
 It was first 8 bit µP
 Its clock speed was 500 KHz
 Could execute 50 KIPS
 INTEL 8080
 Introduced in 1974
 It was also 8 bit µP
 Its clock speed was 2 MHz
 It had 6,000 transistors
 10 times faster than 8008
 Could execute 500 KIPS

Chapter 1 — Introduction to the Microprocessor and Computer — 17


Historical Background
 INTEL 8085
 Introduced in 1976
 It was also 8 bit µP
 Its clock speed was 3 MHz
 Its data bus is 8 bit and
address bus is16 bit
 Could execute 769,230 instructions per second
 It could access 64 KB of memory
 It had 246 instructions

Chapter 1 — Introduction to the Microprocessor and Computer — 18


Historical Background
 INTEL 8086
 Introduced in1978
 It was first16 bit µP
 Its clock speed is 4.77 MHz, 8 MHz and 10 MHz
 Its data bus is 16 bit and address bus is 20 bit
 It has 29,000 transistors
 Could execute 2.5 MIPS
 It could access1 MB of memory
 It has 22,000 instructions
 It has Multiplication and Division instructions

Chapter 1 — Introduction to the Microprocessor and Computer — 19


Historical Background
 INTEL 8088
 Introduced in 1979
 It was also 16 bit µP
 It was created as a
cheaper version of Intel’s 8086
 It was a 16 bit processor with an 8 bit external bus
 INTEL 80186 / 80188
 Introduced in 1982
 They were 16 bit µPs
 Clock speed was 6 MHz

Chapter 1 — Introduction to the Microprocessor and Computer — 20


Historical Background
 INTEL 80286
 Introduced in 1982
 It was 16 bit µP
 Its clock speed was 8 MHz
 INTEL 80386
 Introduced in1986
 It was first 32 bit µP
 Its data bus is 32 bit
and address bus is 32 bit
 It could address 4 GB of memory

Chapter 1 — Introduction to the Microprocessor and Computer — 21


Historical Background
 INTEL 80486
 Introduced in1989
 It was also 32 bit µP
 It had 1.2 million transistors
 Its clock speed varied from 16 MHz to 100 MHz
depending upon the various versions
 INTEL Pentium
 Introduced in 1993
 It was also 32 bit µP
 It was originally named 80586
 Its clock speed was 66 MHz

Chapter 1 — Introduction to the Microprocessor and Computer — 22


Historical Background
 INTEL Pentium Pro
 Introduced in 1995
 It was also 32 bit µP

 INTEL Pentium II
 Introduced in 1997
 It was also 32 bit µP

 INTEL Pentium II Xeon


 Introduced in 1998
 It was also 32 bit µP

Chapter 1 — Introduction to the Microprocessor and Computer — 23


Historical Background
 INTEL Pentium III
 Introduced in 1999
 It was also 32 bit µP
 INTEL Pentium IV
 Introduced in 2000
 It was also 32 bit µP
 INTEL Dual Core
 Introduced in 2006
 It is 32 bit or 64 bit µP
 It has two cores
 Both cores have there own internal bus and L1 cache,
but share the external bus and L2 cache
Chapter 1 — Introduction to the Microprocessor and Computer — 24
Historical Background
 INTEL Core 2
 Introduced in 2006
 It is 64 bit µP
 INTEL Core I7
 Introduced in 2008
 It is a 64 bit µP
 INTEL Core I5
 Introduced in 2009
 It is a 64 bit µP
 INTEL Core I3
 Introduced in 2010
 It is a 64 bit µP
Chapter 1 — Introduction to the Microprocessor and Computer — 25
Historical Background
Conceptual views of:
80486, Pentium Pro,
Pentium II, Pentium III,
Pentium 4, and Core2
microprocessors

Chapter 1 — Introduction to the Microprocessor and Computer — 26


Historical Background
 Early 8-bit Microprocessors Manufacturer

Chapter 1 — Introduction to the Microprocessor and Computer — 27


Historical Background

Chapter 1 — Introduction to the Microprocessor and Computer — 28


Historical Background

Chapter 1 — Introduction to the Microprocessor and Computer — 29


Historical Background
 Intel, Motorola, and Zilog continue to create new
improved microprocessors
 IBM also produces Motorola-style microprocessors
 Motorola sold its microprocessor division
 Now called Freescale Semiconductors, Inc
 Zilog still manufactures
 Microcontrollers and embedded controllers instead
of general-purpose microprocessors

Chapter 1 — Introduction to the Microprocessor and Computer — 30


The 16-Bit Microprocessor
 Intel introduced the 80286 in 1983
 An updated 8086
 Almost identical to the 8086/8088
 Addressed 16M-byte memory system instead of a 1M-
byte memory system
 Instruction set almost identical except for a few
additional instructions
 Managed the extra 15M bytes of memory
 80286 clock speed increased in 8.0 MHZ version
 Execute some instructions in 250 ns (4.0 MIPs)

Chapter 1 — Introduction to the Microprocessor and Computer — 31


The 32-Bit Microprocessor
 Applications demanded faster microprocessor
speeds, more memory, and wider data paths
 Led to the 80386 in 1986 by Intel
 Major overhaul of 16-bit 8086–80286 architecture
 Intel’s first practical microprocessor to contain a
32-bit data bus and 32-bit memory address bus
 Intel produced an earlier, unsuccessful 32-bit
microprocessor called iapx-432
 Through 32-bit buses, 80386 can addressed up
to 4G bytes of memory
 1GB memory = 1024M, or 1,073,741,824 locations
Chapter 1 — Introduction to the Microprocessor and Computer — 32
The 32-Bit Microprocessor
 80386SX addressed 16M bytes of memory
through a 16-bit data and 24-bit address bus
 80386SL/80386SLC addressed 32M bytes
memory via 16-bit data, 25-bit address bus
 80386SLC contained an internal cache to process
data at even higher rates
 Intel released 80386EX in 1995
 Called an embedded PC (computer on a single
integrated circuit)

Chapter 1 — Introduction to the Microprocessor and Computer — 33


The 32-Bit Microprocessor
 80386 Registers
 8-bit registers are:
 AH, AL, BH, BL, CH, CL, DH, and DL
 16-bit registers are:
 AX, BX, CX, DX, SP, BP, DI, and SI
 32-bit extended registers are:
 EAX, EBX, ECX, EDX, ESP, EBP, EDI, and ESI
 The segment registers are:
 CS, DS, ES, SS, FS, and GS

Chapter 1 — Introduction to the Microprocessor and Computer — 34


16-Bit / 32-Bit Microprocessor

Chapter 1 — Introduction to the Microprocessor and Computer — 35


80386 Assembly Programming
 80386 Assembly Programming
 Each 4 GB memory location of 80386 represents a
byte wide (8-bit) location
 32 bit words will be stored in four consecutive Memory
locations
 MOV BL, [ ] // 8 bit
 MOV BH, [ ] // 8 bit
 MOV BX, [ ] // 16 bit
 MOV EBX, [ ] // 32 bit
 MOV RBX, [ ] // 64 bit

Chapter 1 — Introduction to the Microprocessor and Computer — 36


80386 Assembly Programming
Example: MOV BX, [0020]
80386 reads the first byte and stores the data in BL,
then reads the 2nd byte and stores the data in BH
BL  (0020)
BH  (0021)

Example: MOV DH, [00FF]


80386 reads the byte from 00FF location and stores the
data to DH
DH  (00FF)

Chapter 1 — Introduction to the Microprocessor and Computer — 37


80386 Assembly Programming
 MOV Instruction
MOV (mnemonic) destination, source (operands)
; Copy source operand to destination

MOV CL,55H ; Move 55H into register CL


MOV DL,CL ; Move/copy the contents of CL into DL (DL=CL=55H)
MOV CX,468FH ; Move 468FH into CX (CH =46 , CL=8F)
MOV SI,CX ; Now SI=CX=468FH
MOV DS,SI ; Now DS=SI=468FH

Values cannot be loaded directly into (CS, DS, SS and ES)

MOV AX,1234H ; Load 1234H into AX


MOV SS,AX ; Load the value in AX into SS

Chapter 1 — Introduction to the Microprocessor and Computer — 38


80386 Assembly Programming
 ADD Instruction
MOV AL, 24H ; Move 24H into AL
MOV DL,11H ; Move 11H into DL
ADD AL, DL ; AL = AL + DL, (AL = 35H) , (DL = 11H)
MOV CH, 24H ; Move 24H into CH
MOV AX, 34EH ; (AH = ?) , (AL = ?)
MOV DX, 6A5H
ADD DX, AX ; DX = DX + AX (DX = 9F3H)

Chapter 1 — Introduction to the Microprocessor and Computer — 39


80386 Assembly Programming
 ADC: (Add with carry)
If CF = 1 prior to this instruction, then after execution of
this instruction, source is added to destination + 1
MOV AL,F6H
ADC AL,1BH ; (AL = ?)

 SUB: (Subtraction Instruction)


MOV AL,3FH ; Load AL = 3FH
MOV BH,23H ; Load BH = 23H
SUB AL,BH ; Subtract BH from AL. Place result in AL

Execution steps:
AL 0011 1111
BH +1101 1101 (2’s complement)
AL 1 0001 1100
Chapter 1 — Introduction to the Microprocessor and Computer — 40
80386 Assembly Programming
 SBB (Subtract with borrow)
SUB AL,BL ; AL = AL - BL – CF

 MUL (Multiplication)
MUL BL ; AL x BL, result in AX
MUL BX ; AX x BX, result DX_AX
IMUL ; (signed number multiplication)

 DIV (Division)
DIV BL ; Divide AX / BL, quotient = AL reminder in AH
DIV BX ; Divide AX / BX, quotient = AX reminder in DX

IDIV ; (signed number division)

Chapter 1 — Introduction to the Microprocessor and Computer — 41


80386 Assembly Programming
 Logic Instructions
AND BL,0FH ; AND BL with 0FH, result in BL
OR AX,DA68H
XOR DH,78H

 Shift Instructions
SHR BP,1 ; Shift BP one bit right

Shift more than one bit :


MOV AL,9AH ; Load AL with 9A Hex
MOV CL,3 ; Set number of times to shift
SHR AL,CL ; Shift right 3 bits

Chapter 1 — Introduction to the Microprocessor and Computer — 42


80386 Assembly Programming
 Rotate Instructions
MOV AL,46H ; AL = 0100 0110
MOV CL,2 ; CL = 2 number of times to rotate
ROR AL,CL ; (AL = ?)

 Arithmetic Shift
Copy of the old MSB is put in the MSB position
(the sign bit is copied into the MSB)

SAR ; (Shift arithmetic right)


SAR AL,1 ; AL is shifted right arithmetic once

Chapter 1 — Introduction to the Microprocessor and Computer — 43


80386 Assembly Programming
 CMP (Compare)
CMP AL,BL ; Compare AL with CL
; CF and ZF affected

 Clear / Set Carry


CLC ; Clear carry, make CF = 0
STC ; Set carry, make CF = 1

 XCHG (Exchange)
XCHG AH,AL ; Swap AH and AL

Chapter 1 — Introduction to the Microprocessor and Computer — 44


80386 Assembly Programming
 INC / Dec (Increment / Decrement)
INC CL ; CL = CL + 1
DEC DL ; DL = DL - 1

 ADD instruction and Flag Register


The flag bits that affected by the ADD instructions are:

CF, PF, AF, ZF, SF and OF

Chapter 1 — Introduction to the Microprocessor and Computer — 45


80386 Assembly Programming
Example 1: Show how the flag register is affected by the
addition of 38H and 2FH

MOV BH,38H
ADD BH,2FH
0011 1000
+ 0010 1111
0110 0111

CF = 0 ; Since there is no carry beyond digit 7


PF = 0 ; Since there is odd number of 1`s in the result
AF = 1 ; Since there is auxiliary carry from digit 3 to digit 4
ZF = 0 ; Since the result is not zero
SF = 0 ; Since digit 7 of the result is zero

Chapter 1 — Introduction to the Microprocessor and Computer — 46


80386 Assembly Programming
Example 2: Write assembly program that adds 5 bytes
of data

MOV CX,05 ; CX holds the loop count


MOV BX,0200H ; BX holds the offset data address
MOV AL,00 ; Initialize AL
LP: ADD AL,[BX] ; Add the contents of address BX byte to AL
INC BX ; Increment the data pointer
DEC CX ; Decrement the loop counter
JNZ LP ; Jump to LP if the counter not Zero

Chapter 1 — Introduction to the Microprocessor and Computer — 47


Microprocessor-based
Computer System

Chapter 1 — Introduction to the Microprocessor and Computer — 48


Microprocessor-based
Computer System

Chapter 1 — Introduction to the Microprocessor and Computer — 49


Microprocessor-based
Computer System

Chapter 1 — Introduction to the Microprocessor and Computer — 50


Memory and I/O Systems

 Transient Program Area (TPA)


 System Area
 Extended Memory System (XMS)

Chapter 1 — Introduction to the Microprocessor and Computer — 51


Transient Program Area (TPA)
Transient Program Area (TPA)
size is 640K bytes, holds the DOS
(disk operating system) and; other
programs that control the
computer system

Disk Operating System (DOS)


memory map shows how areas of
TPA are used for system
programs, data and drivers

Chapter 1 — Introduction to the Microprocessor and Computer — 52


System Area
 System area size is 384KB
 System area contains
programs on read-only-
memory (ROM) or flash
memory, and areas of
read/write (RAM) memory for
data storage

Chapter 1 — Introduction to the Microprocessor and Computer — 53


Physical Memory Systems

Chapter 1 — Introduction to the Microprocessor and Computer — 54


Physical Memory Systems

Chapter 1 — Introduction to the Microprocessor and Computer — 55


The Microprocessor
 Called the CPU (central processing unit)
 The controlling element in a computer system
 Controls memory and I/O through connections
called buses
 Buses select an I/O or memory device
 Control I/O and memory systems
 Addresses memory or I/O
 Transfer data between I/O devices or memory and
microprocessor
 Memory and I/O controlled via instructions stored
in memory, executed by the microprocessor
Chapter 1 — Introduction to the Microprocessor and Computer — 56
The Microprocessor
 Microprocessor performs three main tasks:
 Arithmetic and logic operations (processing)
 Program flow via simple decisions
 Data transfer between itself and the memory or I/O
systems
 Power of the microprocessor is capability to
execute billions of instructions per second
from program or software (group of instructions)
that is stored in the memory system
 Stored programs make the microprocessor and
computer system very powerful devices

Chapter 1 — Introduction to the Microprocessor and Computer — 57


System Bus

 A common group of wires that interconnect components in a


computer system, address bus, data bus, and control bus
 Transfer address, data, & control information between
microprocessor, memory and I/O
Chapter 1 — Introduction to the Microprocessor and Computer — 58
Control Bus Lines
 Control bus lines select and cause memory or
I/O to perform a read or write operation
 In most computer systems, there are four control
bus connections:
 MRDC (memory read control)
 MWTC (memory write control)
 IORC (I/O read control)
 IOWC (I/O write control)
 Overbar indicates the control signal is active-low;
(active when logic zero appears on control line)

Chapter 1 — Introduction to the Microprocessor and Computer — 59


Basic Computer Architecture
Computers have four classic components:
 Processor, called CPU (Central Processing Unit)

 ALU, Control Unit, Registers, and Clock Generator


 Memory and Storage Devices
 I/O Devices
 System Buses

Chapter 1 — Introduction to the Microprocessor and Computer — 60


Basic Computer Architecture
 Processor consists of:
 Datapath
 ALU: Performs arithmetic and logic operations
 Registers: Are small set of data holding places for the
processor, register may hold an instruction, storage address,
or any kind of data
 Control unit
 Generates the control signals required to execute instructions
 Clock
 Clock refers to a microchip that regulates the timing and
speed of all computer functions
 Synchronizes processor and bus operations

Chapter 1 — Introduction to the Microprocessor and Computer — 61


Basic Computer Architecture
 The speed of a computer processor is measured in
clock speed
 For example, 1 MHz is one million cycles per second,
and 2 GHz is two billion cycles per second
 Cycles per second: clock speed = clock rate = clock
frequency

Chapter 1 — Introduction to the Microprocessor and Computer — 62


8086 Processor Model

Chapter 1 — Introduction to the Microprocessor and Computer — 63

You might also like