AT&T Assembly

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nicholasink

AT&T Assembly

Post 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!
Candamir

Re:AT&T Assembly

Post by Candamir »

Why don't you like nasm?
nicholasink

Re:AT&T Assembly

Post 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.
paulbarker

Re:AT&T Assembly

Post 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.
RetainSoftware

Re:AT&T Assembly

Post 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
0xBADC0DE

Re:AT&T Assembly

Post by 0xBADC0DE »

However, AT&T code might look a little less understandings, with the weird names and the % signs.
Post Reply