[go: up one dir, main page]

Menu

[r10]: / htdocs / howto / nasm.html  Maximize  Restore  History

Download this file

77 lines (62 with data), 4.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>NASM</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="assembly, assembler, asm, inline, 32-bit, IA-32, i386, x86, nasm, gas, as, as86, yasm, fasm, shasm, osimpa, OS, Linux, Unix, kernel, system, libc, glibc, system call, interrupt, small, fast, embedded, hardware, port, macroprocessor, metaprogramming, preprocessor"><link rel="home" href="Assembly-HOWTO.html" title="Linux Assembly HOWTO"><link rel="up" href="assemblers.html" title="Chapter 3. Assemblers"><link rel="prev" href="gas.html" title="GAS"><link rel="next" href="other.html" title="Other Assemblers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">NASM</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gas.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Assemblers</th><td width="20%" align="right"> <a accesskey="n" href="other.html">Next</a></td></tr></table><hr></div><div class="section" title="NASM"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="p-nasm"></a>NASM</h2></div></div></div>
<p>
The Netwide Assembler project provides cool i386 assembler,
written in C, that should be modular enough
to eventually support all known syntaxes and object formats.
</p>
<div class="section" title="Where to find NASM"><div class="titlepage"><div><div><h3 class="title"><a name="p-nasm-where"></a>Where to find NASM</h3></div></div></div>
<p>
<a class="ulink" href="http://nasm.sourceforge.net" target="_top">http://nasm.sourceforge.net</a>,
<a class="ulink" href="http://sourceforge.net/projects/nasm/" target="_top">http://sourceforge.net/projects/nasm/</a>
</p>
<p>
Binary release on your usual metalab mirror
in <code class="filename">devel/lang/asm/</code> directory.
Should also be available as <code class="filename">.rpm</code> or
<code class="filename">.deb</code> in your usual Linux distribution.
</p>
</div>
<div class="section" title="What it does"><div class="titlepage"><div><div><h3 class="title"><a name="idp235568"></a>What it does</h3></div></div></div>
<p>
The syntax is Intel-style.
Comprehensive macroprocessing support is integrated.
</p>
<p>
Supported object file formats are
<code class="literal">bin</code>,
<code class="literal">aout</code>,
<code class="literal">coff</code>,
<code class="literal">elf</code>,
<code class="literal">as86</code>,
<code class="literal">obj</code> (DOS),
<code class="literal">win32</code>,
<code class="literal">rdf</code> (their own format).
</p>
<p>
NASM can be used as a backend for the free LCC compiler
(support files included).
</p>
<p>
Unless you're using BCC as a 16-bit compiler
(which is out of scope of this 32-bit HOWTO),
you should definitely use NASM instead of say AS86 or MASM,
because it runs on all platforms.
</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
<p>
NASM comes with a disassembler, NDISASM.
</p>
</div>
<p>
Its hand-written parser makes it much faster than GAS,
though of course, it doesn't support three bazillion different architectures.
If you like Intel-style syntax, as opposed to GAS syntax,
then it should be the assembler of choice...
</p>
<p>
Note: There are <a class="link" href="resources.html" title="Chapter 7. Resources">few programs</a>
which may help you to convert source code between AT&amp;T and Intel assembler syntaxes;
some of the are capable of performing conversion in both directions.
</p>
</div>
</div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gas.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="assemblers.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="other.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">GAS </td><td width="20%" align="center"><a accesskey="h" href="Assembly-HOWTO.html">Home</a></td><td width="40%" align="right" valign="top"> Other Assemblers</td></tr></table></div></body></html>