Laboratory Manual: Microprocessor & Microcontroller
Laboratory Manual: Microprocessor & Microcontroller
Laboratory Manual: Microprocessor & Microcontroller
Engineering
1. OBJECTIVE:
2. EXPERIMENT REQUIREMENTS:
2.1. SOFTWARE
1. DOSBox
2. Notepad++
3. AFD
DOS Box
Dos Box in IT`s Lang is a term that gets used in more than one way. People may refer to a Dos box as
some sort of emulator or software
Dos box is actually an X86 simulator it needs a directory that contain the file that need to run and used to
process all the file
Note pad++
Notepad++ is a content manager and source code editorial manager for use with Microsoft Windows. It
underpins selected altering, which permits working with various open documents in a solitary window
2.2. HARDWARE
In this lab we only use PC having specification
Processor: Intel(R) core™i7-3537U CPU @2.00GHZ, 2501 MHz, 2 core(s),4 Logical processor(s)
3. BACKGROUND
[6:51 am, 4/20/2019] Haider Uni: The first program that we will write adds three numbers. This very
simple program will clarify most of the basic concept of assembly language. We will start with writing
our algorithm in pseudo code and the convert it into assembly language, but let’s first clarify what is
program?
Definition:
Pseudo Code:
[6:51 am, 4/20/2019] Haider Uni: Even in this simple reflection of thoughts in English, there are some
keys things to observe. One is the concept of destination as every instruction has a “to destination” part
and there is a source before it as well. For example, the second line has a constant 10 as its source and the
register BX as its destination the key point in giving the first program in English that you know very well,
and every concept will eventually be applicable to assembly language. Intel could have made their
assembly language exactly identical to our program in plain English but they have abbreviated a lot of
symbols to avoid unnecessarily lengthy program when the meaning could conveyed with less effort. For
example, Intel has named their move instruction “mov” instead of move. Similarly, the Intel odder of
placing source and destination in opposite to what we have used in our English program, just a change
interpretation so, the Intel way writing things is:
4. PROGRAM
Program that add two numbers
[ORG 0x100] ; Starting Offset
mov ax,5 ; Assigning a value to register ax
mov bx,10
ADD ax,bx
mov ax,15
ADD ax,bx
mov ax,0x4c00
Int 0x21
5. METHODOLOGY
a. First turn on the PC
b. Open Notepad++.
c. Write pseudocode of (written above) in Notepad ++.
d. Then save the file in C drive in hadi.assembly folder with “asm” extension.
e. Now open DosBox and load the file hadi.assembly placed in drive C by typing this command.\
f. Sub sequent that “C:” and then ‘dir’ to check available file in hadi.assembly folder.
g. After call the compiler for manipulation of the selected file by the command here nasm is
netwid assembler , hadi is file on which we have written codes via notepad ++ ‘o’ stands for output
and ‘l’ stands for make list file. For object file (nasm hadi.asm –o hadi33.com). For list file (nasm
hadi.asm –l hadi3.lst). Type hadi3.lst to see the code in hexadecimal
h. At last giving advance full screen debugger instruction for execution (afd hadi3.com).The window
will appear where we run our program step by step by pressing F1/F2.
6. DATA TABLE
Table 1 Data Table
As we can see, the registers are all shown at the topside of the window, the memory is shown to the far
and the bottom of the window. The program is written to the right wide of the window. This program will
run step at a time whenever the user presses F1 or F2 key.
8. CONCLUSION
This laboratory experiments holds the techniques about microprocessor iAPX86’s architecture and
standup and application of microprocessor system. Nevertheless, the coding of Assembly language is a bit
lengthy comparatively other high-level languages, but it is more effective, efficient and accurate. This lab
holds all about moving and adding the data of two registers and assembly language’s syntax.