Page 1 of 1
AT&T Assembly
Posted: Wed Mar 22, 2006 1:13 pm
by nicholasink
Hi,
Does anybody know of good resources when it comes to AT&T assembly? It seems that most novice kernel projects use the Intel syntax, but since I try to avoid using NASM in my projects, I was wondering if perhaps there are projects like libosdk, for example, but that use the AT&T syntax.
Many thanks!
Re:AT&T Assembly
Posted: Wed Mar 22, 2006 5:02 pm
by Candamir
Why don't you like nasm?
Re:AT&T Assembly
Posted: Wed Mar 22, 2006 5:19 pm
by nicholasink
It's not that I don't like NASM, however, there are some details that can make it annoying.
To begin, the Intel/NASM syntax is not the "original" Unix way. That is to say, Unix systems like Linux usually use AT&T syntax. Furthermore, NASM is not default on some Unix systems - thus, it provides potential incompatibility.
Finally, although I don't know a lot about assembly language, I personally prefer the AT&T syntax because it is more explicit and is supported by GNU as (a big benefit).
So it's not so much that NASM isn't good, as that AT&T comprises of a more Unix-like style of writing a kernel.
Re:AT&T Assembly
Posted: Wed Mar 22, 2006 5:30 pm
by paulbarker
As a side note I prefer NASM and YASM, but GNU AS is the only way to go for portability. The AT&T syntax is designed to be more like the syntax for other processor assembly languages than the strangely reversed Intel syntax (which I actually like).
Some days you've gotta compromise, in this case between personal likes and portability.
Re:AT&T Assembly
Posted: Thu Mar 23, 2006 2:03 am
by RetainSoftware
i also use gas and started learning at&t style from the following link
http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html
greets
Re:AT&T Assembly
Posted: Fri Mar 24, 2006 4:45 pm
by 0xBADC0DE
However, AT&T code might look a little less understandings, with the weird names and the % signs.