Packages and Binaries:
nasm
Netwide Assembler. NASM will currently output flat-form binary files, a.out, COFF and ELF Unix object files, and Microsoft 16-bit DOS and Win32 object files.
Also included is NDISASM, a prototype x86 binary-file disassembler which uses the same instruction table as NASM.
NASM is released under the 2-clause BSD license.
Installed size: 3.67 MB
How to install: sudo apt install nasm
Dependencies:
- libc6
nasm
The Netwide Assembler, a portable 80x86 assembler
root@kali:~# nasm -h
Usage: nasm [-@ response_file] [options...] [--] filename
Options:
-v (or --v) print the NASM version number and exit
-@ file response file; one command line option per line
-h list command line options and exit (also --help)
-h -opt show additional help for option "-opt"
-h all show all available command line help
-h topics show list of help topics (also -h list)
-o outfile write output to outfile
--keep-all output files will not be removed even if an error happens
-Xformat specify error reporting format (see -h -X)
-s redirect messages to stdout
-Zfile redirect messages to file
--info[=lvl] display optional informational messages
--debug[=lvl] display NASM internal debugging messages
-M... generate Makefile dependencies (see -h -M)
-f format select output file format (see -h -f)
-g generate debugging information
-F format select a debugging format (see -h -F)
-gformat same as -g -F format
-l listfile write listing to a list file
-Lflags... add information to the list file (see -h -L)
-Oflags... select optimization (see -h -O)
-t assemble in limited SciTech TASM compatible mode
-E (or -e) preprocess only (writes output to stdout by default)
-a don't preprocess (assemble only)
-Ipath add a pathname to the include file path
-Pfile pre-include a file (also --include)
-Dmacro[=str] pre-define a macro
-Umacro undefine a macro
-w+x enable warning x (see -h -w)(also -Wx)
-w-x disable warning x (also -Wno-x)
-w[+-]error promote all warnings to errors (also -Werror)
-w[+-]error=x promote warning x to errors (also -Werror=x)
--pragma str pre-executes a specific %pragma
--before str add line (usually a preprocessor statement) before the input
--bits nn set bits to nn (equivalent to --before "BITS nn")
--no-line ignore %line directives in input
--gprefix str prepend the given string to the names of all extern,
common and global symbols (also --prefix)
--gpostfix str append the given string to the names of all extern,
common and global symbols (also --postfix)
--lprefix str prepend the given string to local symbols
--lpostfix str append the given string to local symbols
--reproducible attempt to produce run-to-run identical output
--limit-X val set execution limit X (see -h --limit)
ndisasm
The Netwide Disassembler, an 80x86 binary file disassembler
root@kali:~# ndisasm -h
usage: ndisasm [-aihlruvw] [-b bits] [-o origin] [-s sync...]
[-e bytes] [-k start,bytes] [-p vendor] file
-a or -i activates auto (intelligent) sync
-b 16, -b 32 or -b 64 sets the processor mode
-u same as -b 32
-l same as -b 64
-w wide output (avoids continuation lines)
-h displays this text
-r or -v displays the version number
-e skips <bytes> bytes of header
-k avoids disassembling <bytes> bytes from position <start>
-p selects the preferred vendor instruction set (intel, amd, cyrix, idt)
Learn more with OffSec
Want to learn more about nasm? get access to in-depth training and hands-on labs:
Updated on: 2025-Nov-18