AT&T versus Intel syntax

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

What syntax do you prefer?

AT&T
6
17%
Intel
27
77%
Both
1
3%
Not writing for x86 platform
1
3%
I do not write in assembly
0
No votes
 
Total votes: 35

User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

AT&T versus Intel syntax

Post by inflater »

Hey,
just set a poll about these syntaxes, vote, and post your opinion right here. :)
I personally don't like ATT very much because of these %,$,etc. "prefixes", but everybody who is using GCC + GAS are liking ATT more than Intel syntax. Maybe because it's their only choice, maybe because of different ways to write code, etc... :)

Regards
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

Im not much of an "assembler" my self, but i understand the basics, and though AT&T might me more logical in some ways than Intel syntax, but as you say, with Intel you avoid, among onter stuff, those weird % and $'s which i much prefer.

Im no expert, but thats my view of it.
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post by os64dev »

indeed the GCC GAS thingy is the main reason why i like AT&T. I used a lot of NASM early on but that gave some intergration problems and register allocation combined with C/C++ was a b*tch. But again mainly the GAS/GCC combinatie makes itr worth while.
Author of COBOS
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

Why the pointless poll(s)? It's like asking which do you prefer speaking, English or French? Does it really matter, other than what you are most familiar with? On the other hand, it is a good question if we're considering writing an assembly tutorial for beginners and are wondering what the best syntax to use is. Is that the intention? If not, to General Ramblings with you! :wink:

Regards,
John.
User avatar
binutils
Member
Member
Posts: 214
Joined: Thu Apr 05, 2007 6:07 am

Post by binutils »

User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

binutils wrote:http://idc.sourceforge.net/viva.avi
That's cool!

I voted Intel, just because it's what I'm used to. I'll learn AT&T syntax when I need to port my OS to another architecture... Maybe when I retire in 25 years. :P
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

I prefer Intel syntax, i just think its a bit cleaner. However I routinely write in both so it doesn't really matter to me
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

I was converted when I started my C++ rewrite.

All the assembly in Bran's kernel tutorial was rewritten (by me) into AT&T syntax. I just find it easier to look at and understand.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

At/t and intel

Post by DeletedAccount »

At and t was sytax was designed with portablity in mind .. . although there
is nothing like a really portable assembler ... The gas was made to
serve as a backend to gcc(which all feeds it with correct code) and not for hand coding .... it systax seems to be somewhat wired .... and it only supports a subset of the intel instruction set ..not the entire intel instruction set... and i personally i prefer the intel version......

But At/t syntax is cosidered conforming to "standards" and it wont
hurt learning at/t syntax ... It has some logic in it and is not entirely
bad either....
User avatar
JackScott
Member
Member
Posts: 1036
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Mastodon: https://aus.social/@jackscottau
Matrix: @JackScottAU:matrix.org
GitHub: https://github.com/JackScottAU
Contact:

Post by JackScott »

I voted for Intel syntax, since that's what makes more sense to me, and I enjoy writing. However, I hardly ever write Intel syntax, because I'm too busy using GCC/GAS with it's AT&T syntax. I know you can switch it, but I've never bothered.
User avatar
muisei
Member
Member
Posts: 79
Joined: Sat Sep 23, 2006 2:10 pm
Location: Bulgaria
Contact:

Post by muisei »

With GCC you can use "-masm=intel" option to switch to Intel's syntax :wink: .
"All parts should go together without forcing. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer." -- IBM maintenance manual, 1975
Lprogster
Member
Member
Posts: 174
Joined: Tue Nov 14, 2006 11:59 am

Post by Lprogster »

Intel syntax! I am not very proficient in assembly - AT & T is just way strange...
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post by jerryleecooper »

Seems Im the only one who voted both. The intel syntax is like English, and the ATT syntax is like French. No explication.
Post Reply