Page 2 of 2

Re:NASM -> GNU ASM

Posted: Wed Nov 23, 2005 7:55 am
by Solar
Kemp wrote: Just in case anyone takes you seriously...
???

Re:NASM -> GNU ASM

Posted: Wed Nov 23, 2005 9:27 am
by Kemp
Lol, sorry. I meant in case anyone obssessive about Intel syntax took you too seriously. Don't want a religious war on our hands. I would never suggest people who use AT&T syntax shouldn't be taken seriously ;) ;D

Re:NASM -> GNU ASM

Posted: Wed Nov 23, 2005 9:47 am
by Solar
Ah, ok.

Re:NASM -> GNU ASM

Posted: Wed Nov 23, 2005 11:59 am
by Brendan
Hi,

In my experience, it doesn't matter if it's "opcode, source, dest" or "opcode dest, source" - it takes just a little time to get used to if you change.

My main problem with AT&T syntax is things like "[label + esi + eax * 4 + structure.field]", which looks like normal maths in Intel syntax.

My favourite would be 6502 syntax, where there's never more than one operand:

[tt] lda 12 ;Load 12 into the accumlator
sta 0x100 ;Store the accumulator at 0x100[/tt]

Only having 3 general registers and a very limited instruction set makes it very easy to learn...

BTW, if the world was a democracy we'd probably be writing assembly like this:

[tt]m s a
o u d
v b d

e [ e
a b b
x a x
, r ,
[ ] e
f , a
o e x
o c
] x[/tt]

Just a thought....


Cheers,

Brendan

Re:NASM -> GNU ASM

Posted: Wed Nov 23, 2005 12:35 pm
by Kemp
At least we could impress non-programmers with our "matrix code", lol.

Re:NASM -> GNU ASM

Posted: Sat Nov 26, 2005 2:18 pm
by bubach
Intel syntax can't even be compared to that AT&T %%&#"?@??!!! ;D

Re:NASM -> GNU ASM

Posted: Sat Nov 26, 2005 2:45 pm
by Candy
bubach wrote: Intel syntax can't even be compared to that AT&T %%&#"?@??!!! ;D

Code: Select all

echo "....." >asmfile.asm
intel2gas -r <asmfile.asm >asmfile.S
diff asmfile.asm asmfile.S
Yes, you can indeed compare them.

Re:NASM -> GNU ASM

Posted: Sat Nov 26, 2005 9:58 pm
by AR
I don't get the point of arguing over the syntax, it's about as effective as arguing over which assembler is better (assuming the ones being compared both support the entire instruction set), or which code editor, etc, etc.

I personally prefer GAS because I find it easier to understand at a glance, is integrated into GCC and feels more logical to me (left to right as opposed to left to right to left ordering) but if you prefer Intel syntax then use whatever makes you happy.

Less seriously, I wonder if I could create a new dialect of ASM with the Intel layout to the extreme:

Code: Select all

eax, 4 mov
ebx, 5 mov
eax, ebx add

; Or maybe even:
xae, 4 vom
xbe, 5 vom
xae, xbe dda
;D

Re:NASM -> GNU ASM

Posted: Sun Nov 27, 2005 11:04 am
by Kemp
Well that first one would make much more sense to some people :P