pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pgubook-readers] Special mov Syntax of Linux Assembly with "as"


From: Mark Schmid
Subject: [Pgubook-readers] Special mov Syntax of Linux Assembly with "as"
Date: Thu, 20 Sep 2007 23:34:09 +0200

Hi all,

O.K., it seems this list still is working after all.
Sorry for the test email.

Here's something which got me very nervous today:
I'm in chapter 5 right now and I'm stuck because
of a failing hard disk, so I started reading another
book about assembly programming and guess what:

In almost ALL OTHER references to assembly programming,
it says when you want to move a value from one place
to the other with "mov" or "movl", you FIRST state
the DESTINATION and THEN the SOURCE!

Like this: mov eax, $1

That's the EXACT opposite of what we've been learning!
(movl $1, %eax)

Here's why: It seems Programming from the Ground up is
specific to the Linux assembler (G)AS, which uses the
AT&T syntax or convention of "mov". Other than that,
most other assemblers seem to follow the Intel syntax
or convention, which is the exact OPPOSITE of AT&T's
in regards to the mov command!

Here's more about it:
http://www.faqs.org/docs/Linux-HOWTO/Assembly-HOWTO.html
Scroll or jump down to:
3.2.2. What is this AT&T syntax

I think this is a MUST-MENTION in the BEGINNING of Programming
form the ground up, because one of the first things anyone
learning from this book will do, is to check out other
sources about assembly... And BOY will he be confused!

Regards and greetings,
Mark

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail




reply via email to

[Prev in Thread] Current Thread [Next in Thread]