Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Netwide Assembler
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Assembler for the Intel x86 architecture}} {{primary sources|date=February 2012}} {{Use dmy dates|date=March 2020}} {{Infobox software | name = NASM | logo = Netwide Assembler.svg | author = [[Simon Tatham]], Julian Hall | developer = [[H. Peter Anvin]], [[Chang Seok Bae]], [[Jim Kukunas]], [[Frank B. Kotler]], [[Cyrill Gorcunov]] | released = {{Start date and age|df=yes|1996|10}} | latest release version = {{wikidata|property|preferred|references|edit|P348|P548=Q2804309}} | latest release date = {{Start date and age|{{wikidata|qualifier|preferred|single|P348|P548=Q2804309|P577}}|df=yes}} | programming language = [[Assembly language|Assembly]], [[C (programming language)|C]]<ref>{{Cite web|url=https://github.com/netwide-assembler/nasm|title = NASM, the Netwide Assembler|website = [[GitHub]]|date = 25 October 2021}}</ref> | operating system = [[Unix-like]], [[Microsoft Windows|Windows]], [[OS/2]], [[MS-DOS]] | genre = [[x86 assembly language|x86]] [[assembly language|assembler]] | language = [[English language|English]] | license = [[BSD licenses|BSD 2-clause]] | website = {{url|https://www.nasm.us/|nasm.us}} }} The '''Netwide Assembler''' ('''NASM''') is an [[Assembly language#Assembler|assembler]] and [[disassembler]] for the [[Intel]] [[x86]] architecture. It can be used to write [[16-bit]], [[32-bit]] ([[IA-32]]) and [[64-bit]] ([[x86-64]]) programs. It is considered one of the most popular assemblers for [[Linux]] and [[X86|x86 chips]].<ref>{{Cite web|url=http://www.ibm.com/developerworks/linux/library/l-gas-nasm/index.html |title=Linux assemblers: A comparison of GAS and NASM |author=Ram Narayan |website=[[IBM]] |quote=two of the most popular assemblers for Linux, GNU Assembler (GAS) and Netwide Assembler (NASM) |url-status=dead |archive-url=https://web.archive.org/web/20131003180256/http://www.ibm.com/developerworks/linux/library/l-gas-nasm/index.html |archive-date=3 October 2013}}</ref> It was originally written by [[Simon Tatham]] with assistance from Julian Hall. {{As of|2016}}, it is maintained by a small team led by [[H. Peter Anvin]].<ref name="Homepage">{{Cite web|url=http://nasm.sourceforge.net/|title=The Netwide Assembler|access-date=2008-06-27}}</ref> It is [[open-source software]] released under the terms of a simplified (2-clause) [[BSD licenses|BSD license]].<ref name="VersionHistory">{{Cite web|url=https://www.nasm.us/doc/nasmdocc.html|title=NASM Version History|access-date=2019-08-03}}</ref> == Features == NASM can output several binary formats, including [[COFF]], OMF, [[a.out (file format)|a.out]], [[Executable and Linkable Format]] (ELF), [[Mach-O]] and [[binary file]] (.bin, binary disk image, used to compile [[operating system]]s), though [[position-independent code]] is supported only for ELF [[object file]]s. It also has its own binary format called RDOFF.<ref name="Manual">{{Cite web|url=http://alien.dowling.edu/~rohit/nasmdoc0.html|title=NASM Manual|access-date=2009-08-15|url-status=dead|archive-url=https://web.archive.org/web/20090223104837/http://alien.dowling.edu/~rohit/nasmdoc0.html|archive-date=23 February 2009}}</ref> The variety of output formats allows [[retargeting]] programs to virtually any x86 operating system (OS). It can also create [[flat binary file]]s, usable to write [[Booting|boot loaders]], [[read-only memory]] (ROM) images, and in various facets of OS development.<ref name="Manual"/> It can run on non-x86 platforms as a [[Assembly language#Cross assembler|cross assembler]], such as [[PowerPC]] and [[SPARC]], though it cannot generate programs usable by those machines. NASM uses a variant of [[Intel assembly syntax]] instead of [[AT&T syntax]].<ref name="Hyde">{{Cite web|url=http://webster.cs.ucr.edu/AsmTools/NASM/|title=NASM: The Netwide Assembler|access-date=2008-06-27|author=Randall Hyde|author-link=Randall Hyde|url-status=dead|archive-url=https://web.archive.org/web/20100912172954/http://webster.cs.ucr.edu/AsmTools/NASM/|archive-date=12 September 2010}}</ref> It also avoids features such as automatic generation of [[x86 memory segmentation|segment]] overrides (and the related ASSUME directive) used by [[MASM]] and compatible assemblers.<ref name="Manual"/> == Development == NASM version 0.90 was released in October 1996.<ref name="VersionHistory"/> Version 2.00 was released on 28 November 2007, adding support for [[x86-64]] extensions.<ref name="Homepage"/> The development versions are not uploaded to [[SourceForge.net]], but are checked into [[GitHub]] 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 under [[GNU Lesser General Public License|LGPL]], it led to development of Yasm, a complete rewrite of under the [[BSD licenses#3-clause|New BSD License]]. Yasm offered support for x86-64 earlier than NASM. It also added support for [[GNU Assembler]] syntax. === RDOFF === 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,<ref name = "manual">{{cite web|url=http://nasm.sourceforge.net/doc/nasmdoc6.html|title=NASM Manual Ch. 6|access-date=2008-06-27}}</ref> essentially consisting of a header containing a [[serialization]] 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., [[DOS]] [[COM file]]s). In version 0.90, [[Simon Tatham]] added support for an object-file output interface, and for DOS .OBJ files for 16-bit code only.<ref name="CVS">{{cite web|url=http://nasm.cvs.sourceforge.net/nasm/nasm/CHANGES?revision=1.48&view=markup|title=NASM CVS|date=2008-06-08|access-date=2008-06-27}}</ref> 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.<ref name="CVS"/> Since this initial version, there has been one major update to the RDOFF format, which added a record-length indicator on each header record,<ref>{{cite web|url=http://nasm.cvs.sourceforge.net/nasm/nasm/rdoff/doc/v1-v2.txt?revision=1.1&view=markup|title=V1-V2.txt|date=2002-12-04|access-date=2008-06-27}}</ref> allowing programs to skip over records whose format they do not recognise, and support for multiple segments; RDOFF1 only supported three segments: ''text'', ''data'' and ''bss'' (containing uninitialized data).<ref name = "manual"/> The RDOFF format is strongly deprecated and has been disabled starting in NASM 2.15.04.{{r|RDOFF}} == See also == {{Portal|Free and open-source software}} * [[Assembly language]] * [[Comparison of assemblers]] == References == {{Reflist|refs= <ref name=RDOFF>{{cite web |url = https://www.nasm.us/doc/nasmdoc8.html#section-8.13 |title = Relocatable Dynamic Object File Format (deprecated)}}</ref> }} == Further reading == * {{Cite book|title=Assembly Language Step by Step|author=Jeff Duntemann|publisher=J Wiley and Sons|year=2000|isbn=0-471-37523-3|url-access=registration|url=https://archive.org/details/assemblylanguage0000dunt_c8n9}} == External links == * {{Official website|https://www.nasm.us}} * {{Sourceforge|nasm}} * [https://web.archive.org/web/20111016034545/http://www.realtech-vr.com/nasm/ Special edition for Win32 and BeOS.] * [https://developer.ibm.com/articles/l-gas-nasm/ A comparison of GAS and NASM] at [[IBM]] * {{freshmeat|intel2gas}}: a converter between the source format of the assemblers NASM and [[GNU Assembler|GAS]] {{X86 assembly topics}} [[Category:1996 software]] [[Category:Assemblers]] [[Category:Disassemblers]] [[Category:DOS software]] [[Category:Free and open source compilers]] [[Category:Linux programming tools]] [[Category:MacOS]] [[Category:MacOS programming tools]] [[Category:Programming tools for Windows]] [[Category:Software using the BSD license]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:As of
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Freshmeat
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Official website
(
edit
)
Template:Portal
(
edit
)
Template:Primary sources
(
edit
)
Template:R
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Sourceforge
(
edit
)
Template:Template other
(
edit
)
Template:Use dmy dates
(
edit
)
Template:X86 assembly topics
(
edit
)