AT&T asm syntax but not IBM asm syntax?

AT&T asm syntax but not IBM asm syntax?

Post by wang ge » Thu, 05 Jul 2001 16:06:46



Someone told me that “movw” and “%” is AT&T
asm syntax.
My question is why they use AT&T asm syntax but not IBM asm syntax in
the arc/i386/boot/bootsct.s
Thanks in advance!
 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by cLIeNUX us » Thu, 05 Jul 2001 19:23:12



Quote:>Someone told me that “movw” and “%” is AT&T
>asm syntax.
>My question is why they use AT&T asm syntax but not IBM asm syntax in
>the arc/i386/boot/bootsct.s
>Thanks in advance!

It's Intel syntax, not IBM.

GNU tools are for unix. gcc produces AT&T syntax for all it's target
machines, because UNIX was from AT&T. The only one that's not the norm for
is x86. Intel syntax is better for address modes, but

                        OP dest, source

is just wrong to me. Of course, I speak a left-to-right language, but so
did the designers of the x86. Plan 9 has a nice compromise; Intelr-like
address mode notation with

                        OP source, dest

Rick Hohensee
www.clienux.com

 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by Andi Klee » Thu, 05 Jul 2001 18:59:11



> Someone told me that “movw” and “%” is AT&T
> asm syntax.
> My question is why they use AT&T asm syntax but not IBM asm syntax in
> the arc/i386/boot/bootsct.s

It is Intel syntax actually what you mean. boot/* is 16bit code and
there was originally no 16bit code support in gas.  So a different assembler
(as86) was used which understands Intel syntax.

-Andi

 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by Kasper Dupon » Thu, 05 Jul 2001 20:01:09



> Someone told me that “movw” and “%” is AT&T
> asm syntax.
> My question is why they use AT&T asm syntax but not IBM asm syntax in
> the arc/i386/boot/bootsct.s
> Thanks in advance!

Probably because that is the syntax used by gcc.
Gcc was inspired by UNIX systems where the AT&T
syntax was the one being used.

--
Kasper Dupont

 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by Bohdan Vlasyu » Thu, 05 Jul 2001 22:13:45



> Someone told me that “movw” and “%” is AT&T
> asm syntax.  My question is why they use AT&T asm syntax but not IBM
> asm syntax in the arc/i386/boot/bootsct.s

because "they" compile it with assembler that understands only AT&T
syntax.
 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by Norman Blac » Sat, 07 Jul 2001 04:18:25


Quote:> OP dest, source

> is just wrong to me. Of course, I speak a left-to-right language, but so
> did the designers of the x86.

Ever take math in school. The destination on the left is a more like math
notation. That would be my guess as to why the destination is on the left.

--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom



> >Someone told me that “movw” and “%” is AT&T
> >asm syntax.
> >My question is why they use AT&T asm syntax but not IBM asm syntax in
> >the arc/i386/boot/bootsct.s
> >Thanks in advance!

> It's Intel syntax, not IBM.

> GNU tools are for unix. gcc produces AT&T syntax for all it's target
> machines, because UNIX was from AT&T. The only one that's not the norm for
> is x86. Intel syntax is better for address modes, but

> OP dest, source

> is just wrong to me. Of course, I speak a left-to-right language, but so
> did the designers of the x86. Plan 9 has a nice compromise; Intelr-like
> address mode notation with

> OP source, dest

> Rick Hohensee
> www.clienux.com

 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by Norman Blac » Sat, 07 Jul 2001 04:20:28


Quote:> OP dest, source

> is just wrong to me. Of course, I speak a left-to-right language, but so
> did the designers of the x86.

Also most high level languages have the destination on the left, in typical
math notation.

--
Norman Black
Stony Brook Software
the reply, fubar => ix.netcom



> >Someone told me that “movw” and “%” is AT&T
> >asm syntax.
> >My question is why they use AT&T asm syntax but not IBM asm syntax in
> >the arc/i386/boot/bootsct.s
> >Thanks in advance!

> It's Intel syntax, not IBM.

> GNU tools are for unix. gcc produces AT&T syntax for all it's target
> machines, because UNIX was from AT&T. The only one that's not the norm for
> is x86. Intel syntax is better for address modes, but

> OP dest, source

> is just wrong to me. Of course, I speak a left-to-right language, but so
> did the designers of the x86. Plan 9 has a nice compromise; Intelr-like
> address mode notation with

> OP source, dest

> Rick Hohensee
> www.clienux.com

 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by cLIeNUX us » Sat, 07 Jul 2001 13:28:30



Quote:>> OP dest, source

>> is just wrong to me. Of course, I speak a left-to-right language, but so
>> did the designers of the x86.

>Also most high level languages have the destination on the left, in typical
>math notation.

Yeah. I think VHDL is assign to the right. You're probably right about
thier reasoning. I disagree with thier reasoning. Assignment is much
different than equality. Assignment is temporal, and in math class time
moved left to right on the x axis.

Rick Hohensee
                www.clienux.com
                                        even later stuff
                                                                end

>--
>Norman Black
>Stony Brook Software
>the reply, fubar => ix.netcom




>> >Someone told me that “movw” and “%” is AT&T
>> >asm syntax.
>> >My question is why they use AT&T asm syntax but not IBM asm syntax in
>> >the arc/i386/boot/bootsct.s
>> >Thanks in advance!

>> It's Intel syntax, not IBM.

>> GNU tools are for unix. gcc produces AT&T syntax for all it's target
>> machines, because UNIX was from AT&T. The only one that's not the norm for
>> is x86. Intel syntax is better for address modes, but

>> OP dest, source

>> is just wrong to me. Of course, I speak a left-to-right language, but so
>> did the designers of the x86. Plan 9 has a nice compromise; Intelr-like
>> address mode notation with

>> OP source, dest

>> Rick Hohensee
>> www.clienux.com

 
 
 

AT&T asm syntax but not IBM asm syntax?

Post by Villy Kru » Sat, 07 Jul 2001 15:47:02


On Thu, 5 Jul 2001 12:18:25 -0700,

Quote:>> OP dest, source

>> is just wrong to me. Of course, I speak a left-to-right language, but so
>> did the designers of the x86.

>Ever take math in school. The destination on the left is a more like math
>notation. That would be my guess as to why the destination is on the left.

Then again, when you say "move" you would normaly name the source item
before the destination item, just like the ordering of the arguments
to the "cp" and "mv" programs.

More likely, though, is that the 386 assembler and compiler was ported
from another architechture that already used the source-destination
ordering, susch as for example the Motorola 68k.

Villy