I'm deciding to buy a new comp, preferably with an AMD processor. But then again, I wonder whether i can write assembly language on my new AMD chip as I thought assembly language was developed by INTEL for it's 8086 chip? So, does AMD also has this kindda chip? If we can still write assembly on the AMD chip, is there a difference in the instructions we are going to use?
Yes, you will still able to code in asm x86 with a amd processor (cyrix too...). AMD processors uses the intel opcodes/assembly... Don't forged that all programs are "converted" to assembly code at compilation time... if it wasn't intel compatible, you would have seen two versions for each program available... There's no difference of instruction names, but they can be optimized differently from intel's processor ones... Some instructions takes more cycles on amd, some more on intel... Cya ! This message was edited by Readiosys, on 6/14/2001 1:14:25 PM
Assembly language is not so much processor dependant, or manufacturer dependant as architecture dependant. Even the word architecture does not explictly cover it, as the x86 architecture has varied greatly through out its age, maybe describeing assembly as instruction set dependant is most correct. All the x86 processors use the same instruction set, and so are all compatable with code written for the x86. There have been extension to the x86 instruction set over the years (MMX, 3DNow, SSE, SSE2, plus many not put under a specific group), but AMD cover all those under MMX, 3DNow, and SSE with its Palomino core (Athlon 4). Basically if it runs the x86 instruction set, it should run your code, whether the chip is made by Cyrix (as my 486 is), IDT (who then bought Centaur (who made Cyrix brand chips) and were then bought by VIA, who now make the Samuel core, or AMD, even the DEC alpha could emulate the Pentium, and so would run x86 code). The only thing to bear in mind is performance differences. AMD has a similar document to intel, that reguards the optimisation of code for their chips. The Athlon core (and Duron as they're essentially the same) have poorer branch prediction than their Pentium cousins, but they have more L2 cache, and don't suffer so badly with partial register stalls. Essentially the answer to your question though is that you will need to make no change to your code to run on an AMD processor. Mirno
AMD and Intel use the same basic instruction set. But aren't things like 3DNow, AMD only extensions? Also, the .K3D directive showed up, I think in MASM 6.15, that supports the "K3D" instructions. :)
Yup 3DNow was developed just after MMX by AMD, and was implemented in their K6-2. SSE was the Intel response to 3DNow, and recently SSE was licensed to AMD as a part of some on going agreement between the two. Because of the nature of the current crop of chips (RISC core and decoders that break up instructions into micro-ops) SSE was easily implemented in the Palomino core because of its similarity to 3DNow. As for K3D this may be a reference to the 3DNow Enhanced, but I can't be sure on that. Mirno
Thanx guys. SO, i think buying AMD athlon would have no effect for my learning of assembly language.
1. AMD chips lack some intstructions available with Pentium (Don't warry - it's not common instruction set) 2. Some optimization issues demand a different approach with these two kinds of chips (Check discussion in Algorithm section relative to different speed result with AMD and PentiumIII proc). Nevertheless it shouldn't affect a learning process of asm language itself, it just provokes more advanced learning of some particular topics toward one or another chip architecture. The Svin.