≡ Menu

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

Share this on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 1 comment… add one }
  • name February 21, 2014, 6:02 pm

    404 not found

Security: Are you a robot or human?

Leave a Comment

   Tagged with: , , , , , , , , , , , , , , , , ,