I'm taking Assembly in a class and we're using X86 AT&T code.. Little Endian?

I'm not sure what bits of that are more important, i know little endian displays the info backwards of how we write it out..

But i asked the teacher if he could suggest any books to go along with the class, basically we're running off of online material he wrote out for the class and notes from lectures. I was hoping having another source to run off of would help the concepts sink in better. Sometimes rewording things can make all the difference.

Anyway, when i asked him if he could suggest any books he said that most were written in Intel syntax? Or something like that. And that i'd be hard pressed to find one written in AT&T code.

So i was hoping someone here might know a thing or two about it, and be able to point me towards a good book? I don't think the conventions are totally different between intel syntax and AT&T syntax but i'd kind of like to reinforce the syntax i'm being taught, instead of mixing myself up while in the middle of a test or something.

Oh i saw the ASM book thingy i was kind of hoping something that's in print, physical? something i could hold with my own two hands..

Well, any help would be apreciated.
Posted on 2009-03-06 19:46:31 by Ringmaster
http://asm.sourceforge.net/resources.html#tutorials

In a sense, yes, little endian is "backwards" compared to left-to-right languages, such as English. Data is stored in this manner at applicable byte-sized boundaries.

Please note however, that the x86 processor series itself is little endian, and has nothing to do with AT&T vs. Intel syntax.
Posted on 2009-03-06 23:16:16 by SpooK
he said that most were written in Intel syntax? Or something like that. And that i'd be hard pressed to find one written in AT&T code


What kind of teacher is that? He doesn't seem qualified at all to teach that subject. This could be compared to someone teaching ancient Greek to people who want to learn how to speak the modern Greek language with the current vocabulary. :shock:
Posted on 2009-03-07 21:37:45 by Raymond

What kind of teacher is that? He doesn't seem qualified at all to teach that subject. This could be compared to someone teaching ancient Greek to people who want to learn how to speak the modern Greek language with the current vocabulary. :shock:


Sounds like a normal CompSci teacher to me :P
Posted on 2009-03-08 08:00:04 by JimmyClif
he likes to explain everything he teaches in one language lower then he's teaching. Usually but we are learning assembly..

Ok so x86 with AT&T code is all i need to remember?
Posted on 2009-03-13 21:57:32 by Ringmaster
At&T syntax in some ways is more intuitive, for example the source,destination configuration makes more sense in L2R reading. For docs and examples using AT&T syntax you just have to find examples and literature that use GAS, the GNU assembler, it uses AT&T. I have problems with the Ijxx, $Literal, and *label stuff but it does make writing a parser much easier and allows the language developer to concentrate on more enhanced features.

What kind of teacher is that? He doesn't seem qualified at all to teach that subject. This could be compared to someone teaching ancient Greek to people who want to learn how to speak the modern Greek language with the current vocabulary.


Actually the teacher is quite right, most books for x86 are written for MASM or NASM, very few exist for GAS.
Posted on 2009-03-14 00:20:16 by donkey
Yup, that's the problem with AT&T syntax...
Every CPU manufacturer will publish their own programmer's guide and instructionset reference, and as such define a standard for the assembly language for that CPU.
For the x86 this is commonly known as Intel syntax (Intel being the one that developed the x86 and published the original programmer's guides and references). Early assemblers like MASM and TASM used this syntax.

AT&T is the company that originally developed UNIX and the computers it ran on (this was later split up into the company known as Digital). At some point, people ported the GNU compiler collection to x86. This resulted in a somewhat 'bastardized' x86 syntax, which looks much like the asm syntax used on Digital and related UNIX systems, but with the x86 instructionset.
Since in a way this is a 'rogue' project, it never was documented all that well. You can find fragments on the GNU site for gcc/gas, but I've never found an official programmer's guide or instructionset reference like the originals that Intel published, but for AT&T syntax. Therefore I think it's best to start out with Intel syntax, using a popular assembler like MASM, and then later learning how to translate that to AT&T syntax. Else it's quite hard to apply Intel documentation in an AT&T context. Basically you won't know how to read the official manual for your CPU.
Posted on 2009-03-15 08:53:37 by Scali
Ringmaster,

You might wanna try "Programming From The Ground Up", it teaches Linux assembly using AT&T syntax. It's downloadable from http://www.very-clever.com/download/nongnu/pgubook/, and if you prefer something you can hold in your hands (besides your screen when reading a PDF :)), you can also buy a dead-tree version: http://www.amazon.com/Programming-Ground-Up-Jonathan-Bartlett/dp/0975283847.
Posted on 2009-03-23 16:24:06 by buzzkill

he said that most were written in Intel syntax? Or something like that. And that i'd be hard pressed to find one written in AT&T code


What kind of teacher is that? He doesn't seem qualified at all to teach that subject. This could be compared to someone teaching ancient Greek to people who want to learn how to speak the modern Greek language with the current vocabulary. :shock:
The assembly books (rather than online material) I've come around for x86 have all been in Intel syntax (and a lot of them focusing on 16bit code).

Granted, it's been a while since I looked after books, but back then I never came around any in AT&T syntax. Some online material i AT&T, sure, but when dealing with x86 the majority is still Intel syntax (whether it be TASM, MASM, NASM, FASM or whatever variant).
Posted on 2009-03-23 20:12:26 by f0dder