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!
AT&T Assembly
Re:AT&T Assembly
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.
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
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.
Some days you've gotta compromise, in this case between personal likes and portability.
Re:AT&T Assembly
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
http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html
greets
Re:AT&T Assembly
However, AT&T code might look a little less understandings, with the weird names and the % signs.