I'm thinking of getting NASM to do x86 Assembly programming. I'm wondering, will an x86 assembler work on AMD64? Does AMD64 understand x86, or does NASM convert the x86 to AMD assembly? I've never heard of an AMD64 Assembly language, so I don't know what form of Assembly AMD CPUs use. I have both an AMD-based PC and an Intel-based Mac, and I want to try it out of both of them.
9 replies to this topic
#1
Posted 29 March 2011 - 04:41 PM
Programming is a journey, not a destination.
|
|
|
#2
Posted 29 March 2011 - 06:25 PM
Intel and amd are basically the same... I think the main difference is one has mmx and the other has 3d now... And a few others.
You can look into nasmx...NASMX - Projects - ASM Community
You can look into nasmx...NASMX - Projects - ASM Community
#3
Posted 29 March 2011 - 06:29 PM
No, nasm doesn't do x64.. Nasmx does NASMX - Projects - ASM Community intel and amd are basically the same
#4
Posted 30 March 2011 - 03:54 AM
I thought NASM assembles 64-bit assembly, doesn't it?
Such as this?:
And it has options for output format such as elf64, win64, and macho64; is x64 different from 64-bit?
Such as this?:
BITS 64 ORG 0 start: mov rax, 65 sub rax, rbx
And it has options for output format such as elf64, win64, and macho64; is x64 different from 64-bit?
#5
Posted 30 March 2011 - 09:10 AM
RhetoricalRuvim said:
I thought NASM assembles 64-bit assembly, doesn't it?
oops.. Had a long day
Edited by Roger, 31 March 2011 - 12:04 PM.
#6
Posted 30 March 2011 - 05:37 PM
I'm kind of confused here, because I've seen 64-bit operating systems described as being written for x86. I thought x86 was just a term for the main line of Intel processors (as opposed to Itanium, which has its own instruction set), regardless of whether they are 32-bit or 64-bit.
Programming is a journey, not a destination.
#7
Posted 30 March 2011 - 06:10 PM
Itanium is known as IA-64. X86 is a general term for 32 bit cpus.. X64 is a general term for 64 bit cpus.. Intel calls it IA-32... Amd calls them x86 and x64 at least thats what their manuals call em.
#8
Posted 30 March 2011 - 09:31 PM
I think I will take a crack at the terminology at least.. Intel originally named their Intel 80386 instruction set IA-32e (ironically in '86), we consider this the term x86 only because the line of processors ended in that model number. Intel wished to move on to 64-bit capabilities, and decided to make a 64 bit only processor instruction set which is a bit silly (but had truth back then), and as such named the instruction set IA-64 with the inclusion of their Itanium line of processors.
AMD's figured this was a bit silly as well and wished to design an alternative to this, so they designed an architecture named AMD64 which is in fact an extension of the x86 instruction set, the vender neutral term for this is x86-64. Intel decided to provide similar support for their IA-32e processors later in the form of Intel EM64t technology which provided an implementation to the proclaimed "x86-64" instruction set extension, and is now named Intel 64.
So in other words you should be fine compiling for a 64 bit (or in other words as mentioned, x86-64) architecture as long as you stay away from IA-32e-only instructions or AMD64-only instructions (suchas 3DNow!)
AMD's figured this was a bit silly as well and wished to design an alternative to this, so they designed an architecture named AMD64 which is in fact an extension of the x86 instruction set, the vender neutral term for this is x86-64. Intel decided to provide similar support for their IA-32e processors later in the form of Intel EM64t technology which provided an implementation to the proclaimed "x86-64" instruction set extension, and is now named Intel 64.
So in other words you should be fine compiling for a 64 bit (or in other words as mentioned, x86-64) architecture as long as you stay away from IA-32e-only instructions or AMD64-only instructions (suchas 3DNow!)
Edited by Alexander, 04 April 2011 - 12:13 AM.
Was autobolded?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#9
Posted 30 March 2011 - 09:44 PM
So there are superannuated instructions that are not supported by 64-bit? And do 64-bit processors start up in real-address mode, also?
#10
Posted 04 April 2011 - 12:01 AM
RhetoricalRuvim said:
So there are superannuated instructions that are not supported by 64-bit?
Some examples of invalid instructions in x86-64 mode include:
AAA, AAD, AAM, AAS
BOUND
DAA, DAS
LAHF (in some versions)
Some but not all encodings of LDS and LES
...etc...
Quote
And do 64-bit processors start up in real-address mode, also?
Edited by dargueta, 04 April 2011 - 12:07 AM.
Clarified some stuff
sudo rm -rf /
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









