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

Microprocessors and Interfacing: Lab Task-3

This document provides instructions for using the Advanced Full Screen Debugger (AFD) to debug assembly code. It describes using the Netwide Assembler (NASM) to assemble an assembly code file into an object file, then using AFD to view the assembly listing file and debug the code. Key steps include writing assembly code, assembling it with NASM, and opening the listing file in AFD to view register values and step through the program execution.

Uploaded by

Lubna Safi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views6 pages

Microprocessors and Interfacing: Lab Task-3

This document provides instructions for using the Advanced Full Screen Debugger (AFD) to debug assembly code. It describes using the Netwide Assembler (NASM) to assemble an assembly code file into an object file, then using AFD to view the assembly listing file and debug the code. Key steps include writing assembly code, assembling it with NASM, and opening the listing file in AFD to view register values and step through the program execution.

Uploaded by

Lubna Safi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

M&I Lab Task

Microprocessors and interfacing

Lab Task- 3
Introduction to AFD Debugger

Submitted by: Lubna

Submitted to: Engr . Muhammad Usman

M&I Lab Task

Roll# 469 Semeste r-5 Batch-9

Introduction to AFD Debugger


Objective: An introduction to AFD debugger Theory: A Simulator/Debugger is an that Application contains the Simulator/Debugger Engine and a set of debugger components bound to the task that they should perform (for example a simulation and debugging session). The Simulator/Debugger Engine is the heart of the system. It monitors and coordinates the tasks of the components. Each Simulator/ Debugger Component has its own functionality (e.g., source level debugging, profiling, I/O stimulation). A programming language that is once removed from a computer's machine language. Machine languages consist entirely of numbers and are almost impossible for humans to read and write. Assembly languages have the same structure and set of commands as machine languages, but they enable a programmer to use names instead of numbers. Each type of CPU has its own machine language and assembly language, so an assembly language program written for one type of CPU won't run on another. In the early days of programming, all programs were written in assembly language. Now, most programs are written in a high-level languagesuch as FORTRAN or C. Programmers still use assembly language when speed is essential or when they need to perform an operation that isn't possible in a high-level language.
2

M&I Lab Task

The Netwide Assembler, NASM, is an 80x86 and x86-64 assembler designed for portability and modularity. It supports a range of object file formats, including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ, Win32 and Win64. It will also output plain binary files. Its syntax is designed to be simple and easy to understand, similar to Intel's but less complex. It supports all currently known x86 architectural extensions, and has strong support for macros. Procedure: 1. Open an editor. I used Note pad. 2. Write the program in the Note Pad. 3. The Program is as follows. 4. [Org 0x, 100] mov ax, 5 mov bx, 10 add ax, bx mov bx, 15 add ax, bx mov ax,0x4c00 int 0x21

or

5. [Org 0x, 100] mov ah, 10 mov al, 5 add bx, ax mov ax,0x4c00 int 0x21
3

M&I Lab Task

6. Now save it. 7. Change the extension of the file from *.txt to *.asm. 8. Copy this file and paste in the Folder where nasm is installed. 9. Now open nasm. 10. It would be like this C:\Program files\NASM> 11. Write the code as
12. C:\Program files\NASM> nasm a.asm o a.obj l a.lst 13. C:\Program files\NASM>edit a.lst

14. Its shown in the figure.

15. Press Enter. 16. The window will look like this.

M&I Lab Task

17. Now here we will use Advanced Full Screen Debugger (AFD). 18. Copy AFD.exe file into the NASM folder. 19. Open NASM. 20. It would be like this C:\Program files\NASM>
21. C:\Program files\NASM> AFD a.lst

22. Its shown in the figure.

Conclusion:
5

M&I Lab Task

Here we used AFD debugger to debug our code in assembly language. The upper left side in the window is showing registers and their stored values. We have IP (Index Pointer) indicating the next command to be executed. Below we have the program that is our code. By pressing F1 we can execute our commands.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy