Microcontroller and Microprocessor lab 4
LAB#04: ADRESSING MODES
1.1 OBJECTIVE
To study and examine the NASM and addressing modes
1.2 PRE LAB READING
Computer architecture and assembly language by BILAL MUHAMMAD HASHMI
1.3 EQUIPMENT/SOFTWARE
NASM, DEBUGGER, LINKER, CMD
1.4 COMPONET
PC/COMPUTER
1.5 CODE
REGISTER ADDRESING
1.6 OUT PUT
1
21395
Microcontroller and Microprocessor lab 4
View in debugger output
2
21395
Microcontroller and Microprocessor lab 4
After executing observe register status, IP and memory window
3
21395
Microcontroller and Microprocessor lab 4
IN DIRECT ADDRESING
Listing file is generated
4
21395
Microcontroller and Microprocessor lab 4
5
21395
Microcontroller and Microprocessor lab 4
After executing observe register status, IP and memory window
6
21395
Microcontroller and Microprocessor lab 4
1.7 Procedure
To work in NASM ,we should have following software which is easily download by
google
We must have cmd prompt, afd debugger,NASM and linker
Write the code in notepad and save it by .asm esxtention
Open the cmd prompt
Write the command as describe above in cmd
To load file write saved file name i-e [Link]
And load object file and listing file by extention as .com and .lst respectively
Now to view listing file write edit [Link] the listing file window will open which shows the
program list and steps
Examine carefully so if any error occur then you can easily change it
Then to view object file write afd [Link]
By executing .com afd debugger will open which show the brief explanation
By executing each command the register status changing correspondingly
Also observe the IP status which is loading automatically
There are two memory windows in afd ,both showing the same value of register
Value can also be change in this window on typing in cmd line area.
1.8 NOTES:
Save the notepad file by .asm extention and then retrieve it in cmd by same extention
1.9 ASSESMENT SHEET:
CMS ID: 21395
DATE: 27-04-2015
1-adressing modes
Problem Number
2-examine NASM
Working
Lab Performance
Viva
Total Score in Lab#4
Instructor's Verification
7
21395
Microcontroller and Microprocessor lab 4
8
21395