Linux assembly language comparison: GNU Assembler (GAS) vs Netwide Assembler (NASM)
This article explains some of the more important syntactic and semantic differences between two of the most popular assemblers for Linux®, GNU Assembler (GAS) and Netwide Assembler (NASM), including differences in basic syntax, variables and memory access, macro handling, functions and external routines, stack handling, and techniques for easily repeating blocks of code.
Unlike other languages, assembly programming involves understanding the processor architecture of the machine that is being programmed. Assembly programs are not at all portable and are often cumbersome to maintain and understand, and can often contain a large number of lines of code. But with these limitations comes the advantage of speed and size of the runtime binary that executes on that machine. Even though the differences between these two assemblers are substantial, it's not that difficult to convert from one form to another. You might find that the AT&T syntax seems at first difficult to understand, but once mastered, it's as simple as the Intel syntax.
=> Linux Assemblers: A Comparison of GAS and NASM
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Download advanced Linux programming book PDF version
- History and Culture of Unix Programming - The Art of Unix Programming
- Unix Programming faqs, howto resources on Web and books
- Understanding and using GNU GCC Compiler Parameters
- Bjarne Stroustrup explains why software sucks (bad)
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: access macro, assemblers, assembly programming, assembly programs, blocks, cumbersome, gnu assembler gas, linux gnu, memory access, nasm, netwide assembler, processor architecture, semantic differences, stack, syntactic, syntax, this article explains, variables


Recent Comments
Yesterday ~ 1 Comment
Yesterday ~ 50 Comments
Yesterday ~ 3 Comments
07/22/2008 08:38 pm (2 days ago) ~ 10 Comments
07/22/2008 09:02 am (2 days ago) ~ 8 Comments