I'm wanting to get an assembly book to learn assembly, and was wandering if i get a book for intel x86 processor will there be any problems assembling the code on an amd processor?


3 Answers 3


For the most part you shouldn't notice any problems at all. Any introductory text will be using very common mnemonics (commands) and macros. Intel tried to introduce a 64-bit processor, IA-64 Itanium, that broke compatibility with the 8086 family of processors. AMD stepped up and designed a 64 bit processor that continued to work with older programming. Obvoiusly, this is what ended up being popular and Intel had to drop IA-64 and make something to work like AMD's.(Duntemann 106-107)

So now both AMD and Intel work from a set of instructions that work almost exactly the same. Little things here and there, but because the market demands it there are little differences to us the programmers. Anything you'll be learning will address when a particular mnemonic came along and which models it begins working on, for all but the latest and most obscure stuff you probably won't need for awhile anyway.

I would highly recommend Jeff Duntemann's Step by Step Assembly language. I learned from this originally 15 years ago. I was going to relearn it, and bought some other book... It just didn't work. So I found that Duntemann had released a new edition in 2009. It does a quick cover of the differences with some aspects of x86_64 but focuses on 32 bit. It really a back to front programming guide with more than just assembly. Editing, good commenting, linking, how the cpu moves data, base number counting, etc.

His website. http://duntemann.com/assembly.html

Amazon link for the book: http://www.amazon.com/Assembly-Language-Step---Step-Programming/dp/0470497025/ref=sr_1_1?ie=UTF8&qid=1367027229&sr=8-1&keywords=jeff+duntemann

  • 1
    You are right, so am I. Sorry, the answer is confusing. "No, there will be no problems." I'll edit it to reflect that. Apr 27, 2013 at 1:56

I think it will be compatible(but still depends on what AMD you are using), as cited in Wiki:

x86 assembly language is a family of backward-compatible assembly languages, which provide some level of compatibility all the way back to the Intel 8008. x86 assembly languages are used to produce object code for the x86 class of processors, which includes Intel's Core series and AMD's Phenom and Phenom II series.

  • Maybe also worth mentioning - writing in assembler got easier in 32 bit relative to 16 bit (and I don't just mean dropping segmented addressing), and probably continued getting easier in 64 bit. The original 16-bit x86 was a little awkward because particular registers had particular purposes in mind, so there was some irregularity in which instructions supported which addressing modes and which registers. The scheme was designed for hand-written assembler, which tends to follow register-usage patterns quite strongly, but that still means you have to know the expected patterns.
    – user8709
    Apr 27, 2013 at 5:25
  • As I understand it, because optimising compilers can keep track of what all the registers are being used for without such conventions, and can optimise better with more freedom of choice, more recent versions are more regular. The register names are now mostly historic - the base and index registers are now mostly interchangeable and mostly general purpose.
    – user8709
    Apr 27, 2013 at 5:28
  • 1
    @Steve314: regarding the 64-bit being easier part ... unfortunately no. Some of the high/low-byte quirks came back in 64-bit; for example, unlike AH ... DH, the bits 8..15 of R8 - R15 can't be used for byte instructions. Having more registers to juggle with will also require more mental capacity to maintain labels.
    – rwong
    Apr 27, 2013 at 6:43

You will mostly have the same instructions.

There is an instruction named "CPUID" which lets you among other things identify the processor. Obviously it will give different results on AMD and Intel CPUs. And once you know which processor you have, you need to follow the instructions in AMD and Intel manuals separately to get more information about the processor.

Each processor has a different set of features (for example MMX, SSE, SSE2, SSE3 and so on), and you use the CPUID instruction to find what features are available. Once a feature is available, it is the same on all processors. Some instructions were only ever available on one processor; those instructions are usually not used by anybody.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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