• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

x86 Architecture and Assembly Language

GeSuN

Senior member
I'm learning assembly language for Intel 8086 to 80486 at university but, i'm compiling my programs at home where I have an AMD Athlon 1.4GHz...

Are the registers in the Intel CPUs that I've mentionned and the Athlon ones are the same? Is the athlon do the same functions as intel exactly the same way????

 
Yes for the most part. If the registers and instructions weren't the same, programs would be incompatible. The only exception is 3DNOW! and SSE1/2. The intel chips do not support 3dnow and the the Athlon XP does not support SSE2.
 
Yup everything is pretty much the same, other than pre-386 chips only had the AX (16) type registers while everyhting after had EAX (32)

If you are using a 16 bit assembler, you can still use 32 bit registers

DB 66H
MOV AX,[esi+1]


will make a 16 bit assemblers do...


MOV EAX,[ESI+1]


This works in almost all cases where you are trying to make the destination 32 bit


------

Even if your using an old assebmler, you can even manually enter SIMD instructions, though i do not know those off the top of my head.


---

Hammer will be the first x86 cpu to really add to the register set since the 386. Whats unclear at the moment is if it will or will not allow a form of 66H override, I have seen refereance to a 69H override in x86-64 that claims to force an operation to 64 bit. but occording to the published docs, you must be in 64bit protected mode to do this, it could be as simple as telling the CPU to do this, or it could be as complicated as trying to enter protected mode manually was from 16 bit mode.


---

Have fun, it's really fun to hand code things in sometimes just to show off.
 
You can basically program ASM for anything in the 80x86 series without changes after the 80386 chipset ( introduction of p-mode ) which is the biggest change. Most other actions are fairly universal.

There are some differences between Intel & AMD though, mainly the 3DNow! & 3DNow!2 instructions, but those really won't help you a lot as far as anything's concerned.

If you use something like NASM, it automatically utilizes things like MMX, 3DNow!, etc...

just go here:

http://www.google.com/search?q=NASM

and pick one of those sites ( Sorry I lost my direct link after my reinstall of Windows )
 
Back
Top