Welcome to this tutorial on how to install MASM in Windows! MASM is an assembler developed and maintained by Microsoft, and is a powerful tool for writing low-level code. However, installing MASM on newer versions of Windows can be tricky. In this post, I’ll show you how to install MASM on Windows 10, 8.1, 8, and 7 in just a few easy steps.
MASM is an assembler developed and maintained by Microsoft. MASM (8086) won’t run on Windows 7 or newer versions easily whereas it runs well on Windows XP. That is why in this post I am going to show you how to install MASM in Windows.
This tutorial is valid for Windows 10, 8.1, 8, 7.
So, Let’s begin.
Here are 5 steps to Install MASM in Windows.
1. Setup DOSBox on your OS
First, you have to download DOS Box for your PC
- Visit this link (click here)
- Click on Download
- Wait 5-second download will start automatically
After that install DOSBox if you have any doubts about how to install DOSBox, Here is a Guide on how to install DOSBox on Windows.
2. Download 8086.rar
Visit this link (click here)
Click on Download
3. Setup 8086.rar
Open the zip file that you downloaded in step 2.
Copy the 8086 folders in drive C:
4. Create an Assembly file (.asm)
Open your favorite code editor,
Enter the following code
; Hello World program by 360 Tech Explorer’s
DATAS SEGMENT
STRING DB 'Hello World!',13,10,'$'
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START:
MOV AX,DATAS
MOV DS,AX
LEA DX,STRING
MOV AH,9
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START
Save this file with the “.asm” file extension.
5. Run the Assembly file (.asm) in Windows
- Open DOSBox by clicking on it.
- Enter the following command in DOSBox
Z:> mount c c:\8086
This command will mount the 8086 directory as a C drive for DOSBox
- Then, execute the following command to navigate into drive C
Z:> c:
If you want to write a new assembly file, execute the following command
C:> edit file_name.asm
If you already have the Assembly file, follow the following steps
- Copy your Assembly file to the “C:/8086” folder (remember the name)
- Then execute the following to run that file
C:> masm your_file_here.asm
C:> link your_file_here.obj
C:> your_file_here.exe
That’s it! You should now be able to run your assembly files using MASM on your Windows PC. I hope this tutorial was helpful in getting you up and running with MASM. If you have any questions or comments, feel free to leave them below. Happy coding!
8 thoughts on “How to Install MASM in Windows (11, 10, 8, 7)”
After I typed edit it is showing that “illegal command edit”. Is there any solution??
thanks
One that finally worked even in my virtual box for win10
Can i get something like this for 64 bits, so I don’t need dosbox?
Glad to hear!
I had a bit of a problem. I had to press the enter key several times to get back to c: after each masm, link, etc.
the intermediate messages are :
after masm hello.asm
Microsoft (R) macro assembler version 5.00
copyright (C) Microsoft corp 1981-1985, 1987. all rights reserved.
object filename [hello.obj]:
source listing [nul.lst]:
cross-reference [nul.crf]:
j.
then a line about space free
then a message in 2 lines about errors
then a return to the prompt
after link hello.obj
the same first 2 lines as above
then run file [hello.exe]:
then list file [nul.map]:
then libraries [.lib]:
then a warning message – no stack segment
finally when it returns to the prompt and type hello, Hello World!: is printed on the screen.
other than that it works ok
Ken
It works!Great
Glad to hear!