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.