How to Write, Assemble and Debug an Assembly Program
This post is for beginners who face some difficulties in writing, assembling and debugging of assembly program after their first day in assembly class.
So lets start,
First of all you will have to download “nasm”(Assembler). Here I am sharing a complete package also having Advanced Full-screen Debugger(AFD).
To download nasm click here.
1-Editor to write assembly code
To write the assembly code you can use editor of DOS or simple “notepad” in your computer.
By using editor of the DOS,
- Write “cmd” in Run and then type “edit” and press Enter
- An editor with blue screen will be open, just write your code here and save as “abc.asm”(NOTE: save your file with extension .asm) in NASM 0.98 folder.
By using “Notepad” ,
this is the second method to write your code by using Notepad.
- Just open notepad and type your code and save it as “abc.asm” in last extracted folder.
and then type command here “nasm abc.asm -o abc.com”
If screen just pop up and nothing shows, don’t worry,
Now its time to open program in AFD to run it step by step or to debug.
To do so just type there “afd abc.com”
and after pressing Enter you will get,
To run the program just press F1 and F2 to run your code step by step.
Thats all.
In my next tutorial I will show you, how can you compile your code with an easy method.
Tasaddaq Rana
No comments: