I prefere the intel Syntax because it is more logical than AT&T
For example:
with like syntax Intel syntax
when you assign somthing in C/C++ (or any language for that matter) you do sothing like this:
destination = source.
converted to assembly would be
mov destination,source
with AT&T syntax the same insruction would be
mov{size} {some prefix stuff)source, {some prefix stuff)destination
which when converted to C it would look like this
source = destintation
also the memory addressing is also not logical. in AT&T sytax it would look like this
immed32(basepointer,indexpointer,indexscale)
which in mathimatics would be interpreted as
immed32 * basepointer + indexpointer + indexscale
wich is totaly wrong
Assembler Syntax
Re:Assembler Syntax
What a statement! If you think so, why are you doing this poll? To see how many people are so... stupid?... to use an "illogical" syntax?B.E wrote: I prefere the intel Syntax because it is more logical than AT&T
Well OK, I'll bite.
Yep. You use an operator that is defined to assign the right-hand-side value to the left-hand-side value. Nobody who has ever seen a '=' would ever think otherwise.For example:
with like syntax Intel syntax
when you assign somthing in C/C++ (or any language for that matter) you do sothing like this...
Only, in Assembler you don't use '=' ("let x be equal y..."), you use the opcode "mov", which stands for "move". In English, it's "moving from x to y". On shell, it's "mv src dest". In AT&T Assembler, it's "mov x, y" (on all supported platforms AFAIK). Only in Intel it's the other way round...
You know what? I agree. ;D...also the memory addressing is also not logical.
But in the end...
...this isn't a poll to get some kind of information, it's poorly camouflaged flamebait. It's like making a poll "Which OO language do you prefer?", and then giving "C++" and "real OO languages" as options.wich is totaly wrong
I hope you never make it into politics.
Every good solution is obvious once you've found it.
Re:Assembler Syntax
I'm doing this poll to see how many people like the syntax and why they prefere one over the other. I was just commenting on a what I prefere.Solar wrote: What a statement! If you think so, why are you doing this poll? To see how many people are so... stupid?... to use an "illogical" syntax?
I agree, but in a programming sence. many memory functions (ie memcpy, strcpy, strcat, memset,etc..) use the destination source, not the other way arround. So in that sence it is logical to use destination source.Yep. You use an operator that is defined to assign the right-hand-side value to the left-hand-side value. Nobody who has ever seen a '=' would ever think otherwise.
Only, in Assembler you don't use '=' ("let x be equal y..."), you use the opcode "mov", which stands for "move". In English, it's "moving from x to y". On shell, it's "mv src dest". In AT&T Assembler, it's "mov x, y" (on all supported platforms AFAIK). Only in Intel it's the other way round...
also the documentation for the instruction set is in intel syntax.
Re:Assembler Syntax
Well, your post wasn't really inviting calm pointing out of differences.B.E wrote: I'm doing this poll to see how many people like the syntax and why they prefere one over the other. I was just commenting on a what I prefere.
Following that line of reasoning, having a GUI that looks like Windows and a command shell that works like bash is inherently a Good Thing (tm) and anything doing it differently - and perhaps better - a Bad Thing (tm).Many memory functions (ie memcpy, strcpy, strcat, memset,etc..) use the destination source, not the other way arround. So in that sence it is logical to use destination source.
Perhaps if the opcode had been named "let" or "load". But it is named "mov", and placing destination first is counter-intuitive to anyone not already "twisted" by habit.
It's a bit like placing the constant first in comparisons to avoid accidential assignment. The compiler can generate warnings to avoid the same mistake, and it's "readable" as hell - but people keep claiming that it's not so strange after all "once you're getting used to it"...
Hardly surprising, that's why it's called "Intel syntax". I agree this is the second strong point (aside from the memory references) for the Intel syntax. But then, almost anyone who has learned his ASM on a different machine (like the 68k) gets mortbumps just from looking at it....also the documentation for the instruction set is in intel syntax.
I'm someone who prefers verbose programming. I loved the AmigaDOS 'delete' and 'copy' as opposed to bash 'rm' / 'cp', I neatly do a [tt]if ( pointer == NULL )[/tt] instead of [tt]if ( ! pointer )[/tt], I really use [tt]size_t[/tt] for array indexing instead of [tt]int[/tt] - and I like stating long moves with [tt]movl[/tt] and writing registers with leading '%'.
Every good solution is obvious once you've found it.