How to Install MASM (Microsoft Assembler) on Windows 10, 8.1, 8, and 7: Step-by-Step Guide

Kushagra Ojha
2 min readJun 1, 2023

--

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

  1. Visit this link (click here)
  2. Click on Download
  3. 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 
DATAS  SEGMENT
STRING DB 'Hello World!',13,10,'$'
DATAS ENDSCODES 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

  1. Open DOSBox by clicking on it.
  2. Enter the following command in DOSBox
Z:> mount c c:\8086

This command will mount the 8086 directory as a C drive for DOSBox

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

  1. Copy your Assembly file to the “C:/8086” folder (remember the name)
  2. 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!

Thanks for Reading ❤❤

--

--

Kushagra Ojha
Kushagra Ojha

Written by Kushagra Ojha

Exploit Developer | Malware Analyst | Security Researcher

No responses yet