TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Aug 2012 02:00 PM |
What is the difference between all those asm versions? I wanna know so I can decide for wich asm version I would be going for. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2012 02:03 PM |
different "asm versions" usually means different architectures.
x86 asm is for an x86 processor. ARM asm is for an ARM processor. MIPS asm is for a MIPS processor. etc... |
|
|
| Report Abuse |
|
|
geicogeko
|
  |
| Joined: 27 Apr 2010 |
| Total Posts: 2727 |
|
|
| 01 Aug 2012 02:16 PM |
| Do you mean different syntaxes like AT&T and intel? |
|
|
| Report Abuse |
|
|
| |
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
| |
|
Tarabukka
|
  |
| Joined: 18 Jan 2011 |
| Total Posts: 394 |
|
|
| 01 Aug 2012 03:47 PM |
The difficulty is that Intel and everyone else refer to their well-known 64-bit architecture through many different names: x86_64, x86-64, x64, IA32-E, Intel 64, AMD64, etc.
Intel's main lines of 32-bit and 64-bit processors use a generally compatible instruction set (x86 instruction sets). 64-bit x86 processors will first run in real mode (16-bit mode with limited memory access), then protected mode if it is asked by the operating system* (32-bit mode with protected memory access and various other niceties), then long mode if it is asked by the operating system (64-bit mode like protected mode).
You can't run 64-bit instructions or use 64-bit registers on a 32-bit system. You can't use 64-bit instructions in an assembler (not assembly language, the assembler) that only works with/has only been allowed to work with 32-bit instructions.
* ("asked by the operating system" = the operating system sets/ORs a bit in one of the processor's control registers) |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Aug 2012 03:54 PM |
OK :)
Now my last question is: what is an assembler? What is it used for? Etc. Isn't a compiler for ASM languages? |
|
|
| Report Abuse |
|
|
Tarabukka
|
  |
| Joined: 18 Jan 2011 |
| Total Posts: 394 |
|
| |
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 01 Aug 2012 05:33 PM |
"Now my last question is: what is an assembler? What is it used for? Etc. Isn't a compiler for ASM languages?"
The reason that you don't typically call an assembler a "compiler for assembly" is that an assembler maps what you write pretty much 1-to-1 to actual machine code instructions.
As apposed to a higher level language compiler where "a.b.c()" could very well translate into anywhere form 1 to 100's of machine code instructions, you don't know just from looking at the code. |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 01 Aug 2012 05:40 PM |
Ah so it also bloats open the memory from the program, variables and such... Sounds haxy :3 |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 01 Aug 2012 06:07 PM |
| Not so much. It's more a testament to just how much "a()" can do in a higher level language. It could very well burn down your house and format your hard disk in addition to calling the function a. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2012 06:13 PM |
"It could very well burn down your house and format your hard disk in addition to calling the function a."
I lol'd so hard |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
| |
|