Advanced

Linux Assemblers: A Comparison of GAS and NASM

Posted by IdaAshley on · 3 comments
IBM/developerWorks; By Ram Narayam
Mail this story
Print this story

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.

Full Story

  Nav
» Read more about: Groups: Linux

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (3)

I prefer nasm, for compatibility reasons, since it has pretty much the same syntax as masm. That fact made it convenient for me to use nasm on linux in my assembly language programming course while everyone else struggled with masm on windoze...
Hey, isn't the important subtext here composed of two parts?

1. *Two* assemblers exist, and both have enough importance to make it worthwhile to compare and contrast. Compare and contrast this to the Windows world, which allegedly has a "wealth of applications" but really only one so important (usually an MSFT product) as to be worth while talking about.

2. IBM let one of their guys write an article for public, free, distribution.
That's all great, I'm glad of these IBM articles, and it's good to know about the different technologies available to us.

I'm just saying that IMHO gas is a legacy assembler, and the only place I've ever seen it used is in the linux kernel. OTOH nasm is somewhat mainstream, and I've seen it in a number of projects.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post