This articlerelies excessively onreferences toprimary sources. Please improve this article by addingsecondary or tertiary sources. Find sources: "Netwide Assembler" – news ·newspapers ·books ·scholar ·JSTOR(February 2012) (Learn how and when to remove this message) |
![]() | |
Original author(s) | Simon Tatham, Julian Hall |
---|---|
Developer(s) | H. Peter Anvin,Chang Seok Bae,Jim Kukunas,Frank B. Kotler,Cyrill Gorcunov |
Initial release | October 1996; 28 years ago (1996-10) |
Stable release | |
Repository | |
Written in | Assembly,C[2] |
Operating system | Unix-like,Windows,OS/2,MS-DOS |
Available in | English |
Type | x86assembler |
License | BSD 2-clause |
Website | nasm.us |
TheNetwide Assembler (NASM) is anassembler anddisassembler for theIntelx86 architecture. It can be used to write16-bit,32-bit (IA-32) and64-bit (x86-64) programs. It is considered one of the most popular assemblers forLinux andx86 chips.[3]
It was originally written bySimon Tatham with assistance from Julian Hall. As of 2016[update], it is maintained by a small team led byH. Peter Anvin.[4] It isopen-source software released under the terms of a simplified (2-clause)BSD license.[5]
NASM can output several binary formats, includingCOFF, OMF,a.out,Executable and Linkable Format (ELF),Mach-O andbinary file (.bin, binary disk image, used to compileoperating systems), thoughposition-independent code is supported only for ELFobject files. It also has its own binary format called RDOFF.[6]
The variety of output formats allowsretargeting programs to virtually any x86 operating system (OS). It can also createflat binary files, usable to writeboot loaders,read-only memory (ROM) images, and in various facets of OS development.[6] It can run on non-x86 platforms as across assembler, such asPowerPC andSPARC, though it cannot generate programs usable by those machines.
NASM uses a variant ofIntel assembly syntax instead ofAT&T syntax.[7] It also avoids features such as automatic generation ofsegment overrides (and the related ASSUME directive) used byMASM and compatible assemblers.[6]
NASM version 0.90 was released in October 1996.[5]
Version 2.00 was released on 28 November 2007, adding support forx86-64 extensions.[4] The development versions are not uploaded toSourceForge.net, but are checked intoGitHub with binary snapshots available from the project web page.
In July 2009, as of version 2.07, NASM was released under the Simplified (2-clause) BSD license. Previously, because it was licensed underLGPL, it led to development of Yasm, a complete rewrite of under theNew BSD License. Yasm offered support for x86-64 earlier than NASM. It also added support forGNU Assembler syntax.
Relocatable Dynamic Object File Format (RDOFF) is used by developers to test the integrity of NASM's object file output abilities. It is based heavily on the internal structure of NASM,[8] essentially consisting of a header containing aserialization of the output driver function calls followed by an array of sections containing executable code or data. Tools for using the format, including a linker and loader, are included in the NASM distribution.
Until version 0.90 was released in October 1996, NASM supported output of only flat-format executable files (e.g.,DOSCOM files). In version 0.90,Simon Tatham added support for an object-file output interface, and for DOS .OBJ files for 16-bit code only.[9]
NASM thus lacked a 32-bit object format. To address this lack, and as an exercise to learn the object-file interface, developer Julian Hall put together the first version of RDOFF, which was released in NASM version 0.91.[9]
Since this initial version, there has been one major update to the RDOFF format, which added a record-length indicator on each header record,[10] allowing programs to skip over records whose format they do not recognise, and support for multiple segments; RDOFF1 only supported three segments:text,data andbss (containing uninitialized data).[8]
The RDOFF format is strongly deprecated and has been disabled starting in NASM 2.15.04.[11]
two of the most popular assemblers for Linux, GNU Assembler (GAS) and Netwide Assembler (NASM)