The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Ajax on May 10, 2007, 12:56:50 AM

Title: The Difference
Post by: Ajax on May 10, 2007, 12:56:50 AM
Can any one tell me the difference between x86 Assembly and just Assembly if there is any.  Sry if Im asking too many nooby questions but I just started assembly.
Title: Re: The Difference
Post by: dsouza123 on May 10, 2007, 01:35:23 AM
x86 assembly language is assembly language for x86 CPUs.

Each CPU has it's own instruction set,
which make up most of assembly language.

Examples in x86 and 6502 assembly language
both are loading the accumulator register with
immediate value 9A hexadecimal (154 decimal).

x86
mov eax, 9Ah

6502
LDA #$9A

A particular CPU can have multiple assembly languages,
or at least different syntax, x86 has both Intel and ATT
with Intel syntax usually used on Windows and ATT on linux.
Title: Re: The Difference
Post by: dsouza123 on May 10, 2007, 02:19:40 AM
x86  (using ATT syntax)
movl $0x9A, %eax

note the reversed order of parameters
ATT has source first and destination second.


Intel syntax is destination first and source second,
like the C, Pascal, Basic or Fortran order.

acc = 154;
acc := 154;
acc = 154
acc = 154
Title: Re: The Difference
Post by: Ajax on May 10, 2007, 07:34:52 PM
oh ok I get it thanks guys