0% found this document useful (0 votes)
71 views8 pages

Lab#04: Adressing Modes: To Study and Examine The NASM and Addressing Modes

This document describes Lab #4 which focuses on studying addressing modes in NASM assembly language. The objectives are to examine register addressing and indirect addressing. The student is instructed to write code in NASM, assemble and link it, then use a debugger to observe the effect on registers and memory as commands are executed. Register status and the instruction pointer can be monitored as addressing modes are tested.

Uploaded by

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

Lab#04: Adressing Modes: To Study and Examine The NASM and Addressing Modes

This document describes Lab #4 which focuses on studying addressing modes in NASM assembly language. The objectives are to examine register addressing and indirect addressing. The student is instructed to write code in NASM, assemble and link it, then use a debugger to observe the effect on registers and memory as commands are executed. Register status and the instruction pointer can be monitored as addressing modes are tested.

Uploaded by

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

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 u1.asm
 And load object file and listing file by extention as .com and .lst respectively
 Now to view listing file write edit u1.lst 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 u1.com
 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

You might also like