Intro to Microprocessor 8086
By
Sakifa Aktar
Reference Book
Assembly Language Programming and Organization of the IBM PC
By
Ytha Yu
Charles Marut
A Microcomputer System
• Functionally, the computer circuits consist of three parts:
• Central Processing Unit (CPU)
• Memory Circuits
• I/O Circuits
• In a microcomputer, the single chip processor is called a
microprocessor
• Memory circuits are used to store information
• I/O circuits are used to communicate with I/O devices
A Microcomputer System (CONT.)
Fig 1: A typical microcomputer system
System Board
• System Board: the main circuit board
• Contains the microprocessor and memory circuits
• Also called the Motherboard
Fig 2: 8086 CPU Board
Memory
• The memory circuits are usually organized into groups that can store
eight bits of data
• This memory byte circuit/ memory byte is identified by a number
that is called its address
• The data stored in a memory byte are called contents
• Exercise: Solve the example 1.1 of the reference book
Memory Operations
• Processor can perform two operations on memory:
• Read (Fetch) the contents of a location
• Write (Store) the data at a location
Memory Circuits
• Random Access Memory (RAM):
• Can be read and written
• Contents are lost when the machine is turned off
Fig 3: A Typical RAM
• Read Only Memory (ROM):
• Can only be read
• Once initialized cannot be changed
• ROM based programs: firmwares
• Responsible for loading start up programs
Fig 4: A Typical ROM
Buses
• A set of wires or connections
• Responsible for the communication between memory and I/o circuits
• 3 buses:
• Address bus
• Data bus
• Control bus
Bus Connections of a Microcomputer
• To read the contents of a memory location:
• CPU places the address of the
memory location on the address bus
• Address bus receives the data
sent by the memory circuits,
on the data bus
• The control signal to perform the
Read operation Is sent on the control
bus Fig 3: Bus Connections of a Microcomputer
The CPU
Fig 5: Intel 8086 Microprocessor Organization
Execution Unit (EU)
• Execute instructions
• ALU (Arithmetic and Logic Unit)
• Arithmetic and logic operations
• Data is stored in Registers
• Eight registers for storing data(Referred to the figure)
• Flags: reflect the result of a computation
Bus Interface Unit (BIU)
• Facilitates communication between the EU and the memory or I/O
circuits
• Responsible for transmitting:
• Addresses
• Data
• Control Signals
• Registers: CS, DS, ES, SS and IP
• Internal bus is responsible for the connection of the EU and the BIU
Instruction Execution
• Fetch an instruction from memory
• Decode the instruction to determine the operation
• Fetch data from memory if necessary
• Perform the operation on the data
• Store the result in memory if needed
Intel 8086 Pin Diagram
8086 Pin Diagram (Cont.)
• It is available in 40 pin DIP chip
• It uses a 5V DC supply for its operation
• 20-line address bus
• 16-line data bus
8086 Pin Diagram (Cont.)
• AD0-AD15 : Address/Data bus (multiplexed with data)
• A16-A19 : High order address bus (multiplexed with status signals)
• S2, S1, S0 : Status pins
• A16/S3, A17/S4, A18/S5, A19/S6 : The specified address lines are
multiplexed with corresponding status signals
• BHE’/S7 : Bus High Enable/Status
• RD’: This is used for read operation
• READY : This is the acknowledgement from the memory or slow
device that they have completed the data transfer
8086 Pin Diagram (Cont.)
• INTR : Interrupt Request
• This is triggered input
• NMI : Non maskable interrupt
• This is an edge triggered input which results in a type II interrupt
• INTA : Interrupt acknowledge
• MN/MX’ : Minimum/Maximum
• This pin signal indicates what mode the processor will operate in
• RQ’/GT1′, RQ’/GT0′ : Request /Grant
• TEST’ : This examined by a ‘WAIT’ instruction
• ALE : Address Latch Enable
8086 Pin Diagram (Cont.)
• CLK : Clock Input
• RESET : This pin requires the microprocessor to terminate its present
activity immediately
• Vcc : Power Supply
• GND : Ground
• QS1,QS0 : Queue Status
• DT/R : Data Transmit/Receive
• DEN : Data enable
• HOLD/HOLDA : HOLD indicates that another master has been requesting a
local bus
High Level Language vs. Assembly
Language
High Level Language Assembly Language
High level languages are easily understandable Although Assembly level languages are not easy to
understand they are relatively easier as compared to
machine level languages
The programs that are developed in high level The programs written in this language are not portable
language are portable and the debugging process is also not very easy
In case of high level languages debugging of the code The programs developed in assembly language are
is easy and the program written is not machine thoroughly machine dependent
dependent
Compiler is used to compile code in the high-level Assembler is used to translate code in assembly
language
8086 vs. 8088 Microprocessors
8086 8088
Introduced in 1978 Introduced in 1979
The data bus is of 16 bits The data bus is of 8 bits
Faster clock rate and Better performance Slower clock rate
More expensive Less expensive
Operating System (OS): DOS
• Purpose: coordinate the operations of all the devices that make up the
computer system
• Most popular OS for the IBM PC: Disk Operating System (DOS)
• DOS was designed for the 8086/8088 based computers
• DOS manages:
• 1MB of memory
• Doesn’t support multitasking
• DOS is not just one program, it consists of a number of service routines
• User requests a service by typing a command
Operating System (OS): BIOS
• BIOS routines perform I/O operations for the PC like DOS
• BIOS routines are machine specific while DOS operate over the entire
PC family
• BIOS routines are the system routines stored in ROM that are not
destroyed when the power is off
Start–up Operation of the PC
• When the PC starts. 8086 processor is put in a reset state
• CS register is set to FFFFh, IP is set to 0000h (Logical Address -> FFFFh:0000h)
• First instruction is located in FFFF0h (Physical Address)
• This memory location is in ROM
• This instruction transfers control to the starting point of BIOS routines
• BIOS routines first check for system and memory errors
• Then initializes the interrupt vector and BIOS data area
• Finally, BIOS loads the OS from the system disk
Start–up Operation of the PC (Cont.)
• BIOS loads a small program called the boot program
• Boot program is responsible for loading the actual operating system
routines
• After the OS is loaded into memory, COMMAND.COM is then given
control
• POST (Power on Self Test)
Fig 6: Start–up Operation of the PC
Conclusion
• Finish!
• Thanks for listening!