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
Visite 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 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 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 8086 directory as C drive for DOSBox
Then, execute the following command to navigate into drive 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