How to Install NASM on Windows 10 | How to Type and Run Assembly Language Program

The Netwide Assembler is an assembler and disassembler for the Intel x86 architecture. It can be used to write 16-bit, 32-bit and 64-bit programs. NASM is considered to be one of the most popular assemblers for Linux. 

NASM  stands for the net  assembler.  if you want to type edit and execute an assembly language program you need to install NASM on Windows 10 using DosBox.  in this tutorial  you will be guided about how to install NASM on Windows 10 using dosbox. you will also be guided to type an assembly language program and how to to assemble it and then execute the Assembly language program in AFD. 

NASM can be used to write 16 bit, 32-bit and 64-bit programs. NASM is  one of the most popular assemblers for Linux. 

NASM Installation on Windows 10 using DOSBOX

Here are steps to Install NASM on Windows

  • Click to download NASM and DOSBOX
  • Install DOXSBOX 
  • Extract NASM in a Folder
  • Run DoxBox 
  • Mount NASM folder to a Drive  using “ mount [driveletter] [NASM Path]

For example we have extracted NASM on F:\Assebmly then here is command to mount it to X Drive

---> mount X f:\assembly 
Type x:
x:\>

First Program to Add two Numbers in Assembly Language

Type following first program of Assembly Language in any Editor. Like Notepad

;assembly language program to add two numbers
org 0x100
mov ax,5
mov bx,10
add ax,bx
mov ax, 0x4c00
int 0x21
  • Save it with name  “newf1.asm”  in the same folder you have installed NASM 
  • Open DosBox and Assemble it using NASM (like compile in C++)
x:\>NASM newf1.asm -o nf1.com
x:\>AFD nf1.com
  • Program will be loaded in Debugger. USE F2 to run the program and to see the values of registers.

NASM Installation Windows 10 | Run Assembly Program | ADD two numbers | How to Install NASM

Author: Habibullah Qamar

Its me Habib Ullah Qamar working as a Lecturer (Computer Sciences) in Pakistan. I have an MS(M.Phil) degree in computer sciences with specialization in software engineering from Virtual University of Pakistan Lahore. I have an experience of more than 15 years in the filed of Computer Science as a teacher. Blog Writing is my passion. I have many blogs, This one is special made with the aim of providing 100% Free online coaching and training to the students of under-graduate and postgraduate classes. Most of the students enrolled in computer sciences, information technology, software engineering and related disciplines find it difficult to understand core concepts of programming and office automation. They find difficult in understanding and solving their assignments.