Lab 2
Lab 2
LABORATORY MANUAL
Microprocessor
Mansoura University
Faculty of Computers and Information
Information Technology Department
Course: Microprocessor
Code: [IT425P]
Fourth Year
LAB 02:
Computer structure (8086)
LAB Objectives
The goal of this lab is to be able to recognize microprocessors versions and its capabilities. After
completing this lab students should be able to:
Understand computer structure.
Understand different types of registers.
Understand the function of different registers.
LAB Content
Computer general structure:
CPU:
Is the heart of any computer in the von Neumann structure.
System bus:
Connect the various components of the computer.
Ram:
Is the place where the program is stored for execution.
CPU main components:
ALU Arithmetic and logic unit:
Carries out the logic operation like comparison and arithmetic operation like adding
and multiplying.
Control unit:
It is the traffic manager or policeman or the processor, it monitors the execution and
transfer of the data between CPU and, getting data from rams and decoding
instructions.
2
Mansoura University
Faculty of Computers and Information
Information Technology Department
Course: Microprocessor
Code: [IT425P]
Fourth Year
Cd, DS, SS and ES registers in the CPU contains the addresses of the segments.
Pointer register:
Instruction pointer (IP):-
Address of next instruction to be executed, used for accessing instruction for
execution, cannot be changed by any instruction.
Stack pointer (SP):-
Is used for pointing on the stack of the program in the stack segment, point on
current word in the stack.
Base pointer (BP):-
It points to the data in the stack segment, used for register indirect addressing.
Index registers
Index register is used for moving data from one location (source) to another
location (destination).
Source index:-
Source data address in the string manipulation addressing, indexed, based
indexed and register indirect addressing.
Destination index: -
Destination data address in string manipulation instructions, used for
Indexed, based indexed and register indirect addressing.
4
Mansoura University
Faculty of Computers and Information
Information Technology Department
Course: Microprocessor
Code: [IT425P]
Fourth Year
General registers
5
Mansoura University
Faculty of Computers and Information
Information Technology Department
Course: Microprocessor
Code: [IT425P]
Fourth Year
Flag register:
6
Mansoura University
Faculty of Computers and Information
Information Technology Department
Course: Microprocessor
Code: [IT425P]
Fourth Year
TF :
Trap (you can step through execution a single instruction at a time to
examine the effect on registers and memory.
Setting trap flag puts the microprocessor into single step mode for
debugging. (1), the CPU automatically generates an internal interrupt
after each instruction. If trap flag is reset (0), no function is performed
INTEL 80186 & 80188:
OF:
Indicate when an arithmetic overflow has occurred in an operation. This
flag will be set (1) if the result of a signed operation is too large to fit in
the number of bits available to represent it, otherwise reset (0).
Sf:
After any operation if the MSB is 1, then it indicates that the number is
negative. And this flag is set to 1, (0=positive, 1= negative).
Zf:
If the result in the register is zero, then only the Z flag is set.
7
Mansoura University
Faculty of Computers and Information
Information Technology Department
Course: Microprocessor
Code: [IT425P]
Fourth Year
INTEL 80286:
PF:
Indicates if the number of set bits is odd or even in the binary
representation of the result. When result has even number of 1, it will be
set to 1, otherwise 0 for odd number of 1s.
CF: carry.
AF:
Auxiliary carry contains a carry out of 3 bit on 8bit data.
Emulator 8086
Homework 01:
Student Name:
Student ID:
Section:
Dept.:
Year:
Date: