Earn in Dollars

PaidVerts



Write, Assemble and debug assembly program

assembly-mainscreenThis 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.
After downloading this package extract it in “My Documents” FoldeCapture

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.
Capture
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.
Capture

After saving your code, now its time to assemble/compile it. For this purpose you will have to go again in CMD and by help of “cd” and “dir” command go in your last extracted folder in My Documents.
Capture
and then type command here “nasm abc.asm -o abc.com
Capture
that’s all, our program has been assembled. To run the program manually go to the folder of Nasm0.98 and run “abc.com” file.
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
Capture
and after pressing Enter you will get,
Capture2 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.
 
Top