2
$\begingroup$

Could any one suggest me a easy book to learn AT&T syntax of x86 assembly programming so that I can understand the code of xv6 OS better?

Respected Ben. I. had suggested me this free book. But this is a wiki book and at places it shows:

enter image description here

Since it is a community maintained book? And at places there are prompts of clean up, I guess the book contains everything correct. Because I am a self learner and I do not want to learn anything wrong.

Is there any book easy book written by some author?

$\endgroup$
5
  • 3
    $\begingroup$ Is there a reason you want.at&t syntax specifically? Every debugger and recompiler I'm aware.of.can generate both (it's a setting/flag) and, in any case, once you learn x86 assembly in one, it's not hard to learn the other syntax. The commands are exactly the same commands, but written out slightly differently. I only ask because I have been led to understand that there are more resources aimed at beginners using intel syntax. $\endgroup$
    – Ben I.
    Mar 6 at 15:25
  • 1
    $\begingroup$ Actually I want to understand the xv6 operating system coding... And the xv6 operating system: iitd.github.io/os/2022/xv6.pdf uses the AT&T syntax. That's the main reason. And the os video lectures of the professor here: iitd.github.io/os/2022 on youtube also explains parts of x86 AT&T syntax. So, I thought of considering the AT&T syntax as it would help me understand it better... $\endgroup$ Mar 6 at 15:33
  • 2
    $\begingroup$ Those are pretty solid reasons. The commands are 1 to 1, since they're really the same language, so even after you find a good at&t reference, always know that if an explanation is confusing, you can find the corresponding Intel command and find another explanation of the same command :) $\endgroup$
    – Ben I.
    Mar 6 at 15:48
  • $\begingroup$ @BenI., I find the intel syntax utterly confusing (after dabbling in 6505, some VAX 11 under BSD and others; yes, weaned on AT&T syntax). $\endgroup$
    – vonbrand
    Mar 9 at 13:57
  • 2
    $\begingroup$ @vonbrand Haha that's amazing! My background is so similar, 6502, but weaned on Intel, and I find at&t basically impossible to read 🤣 But I did use my trick when I got confused a few times and look up the corresponding command in AT&T syntax for a second explanation $\endgroup$
    – Ben I.
    Mar 9 at 21:09

1 Answer 1

2
$\begingroup$

Learn to Program with Assembly by Jonathan Bartlett (2021) is a great one.

It teaches assembly programming for x86-64 processors using AT&T syntax and the GNU Assembler. It's a follow up to his 2005 text, Programming from the Ground Up, on the same topic.

I'm trying to learn AT&T syntax assembly as well, and I haven't found an equivalent text published in the last decade.

Good luck

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.