This post is regarding How to install MASM software (Microsoft assembler) for running assembly language codes in your PC.
In this Tutorial, I'm going to tell you how to setup 8086 microprocessor programming environment using MASM by virtually running the MASM in DOS Box.
Follow the steps:
1. Firstly, download the MASM required files from - here (It's less than 2 MB in size).
2. Extract the downloaded zip file and you will find two folders named as "DOSBox-0.74" and "8086". (see the image below)
3. Move the folder "8086" into the "C:\" directory of your PC's hard disk.
4. Now open your "DOSBox-0.74" and find the "DOSBox.exe" launcher. Launch it by a double click.
5. Now Type the exact lines found below in the DOSBox and hit enter.
"mount c c:\8086\"
6. Next, type "c:" and hit enter to get into C drive through DOSBox.(see the image below)
7. Now you are ready to compile and execute .asm programs.
Now,
Compiling and executing .asm programs,
1. First, write the assembly language code in notepad(any text editors) and save it exactly in "C:\8086\" with a ".asm" file extension.
2. Now that your assembly language code is present in "C:\8086\", go to DOSBox and get into C drive using the above said steps.
3. Compile your code using the command,
"masm program_name.asm;"
4. Link your object file of the code using the command,
"link program_name.obj;"
5. Run your code using commands:
"program_name.exe" to run it normally.
or type,
"afdebug program_name.exe" if you want to debug the code in the debugging
screen.
See the screenshots below,
1. Running normally using "program_name.exe"
2. Running in debugging mode using "afdebug program_name.exe"
Find the video tutorial on this post here
That's it. Enjoy microprocessor programming. Cheers!
9 comments
Write commentsYo thanks :)
Replylink not working!
ReplyThanx for reporting. Fixed it now. Please check :)
ReplyHi, while using afdebug command, the system is throwing "program too big to fit in memory" error. And is not entering into debug mode. Kindly give a solution.
ReplyMay be you are using a very long code which exceeds your virtual memory. Google search this problem. You can find many posts containing fix for this.
ReplyHey Thanks a lot man!!
ReplyIllegal command : afdebug
ReplyWHY?
it is because you are running a windows version which is no longer supported by Microsoft Inc.
ReplyPlease upgrade to latest Version and try again
after installing
ReplyC:\> masm aaaaa.asm
illegal command: masm.
messgae is came how to resolve it
Share your views about this article!