Heya guys, I've been looking through the internet trying to learn x86 - but it is unbelievably hard to find any kind of resource on this whatsoever.
http://www.skynet.ie/~darkstar/assembler/ I found that recently, and apparently I need as assembler - but it also says that the assembler chosen is the most critical factor, which implies to me if I choose a free assembler, I won't be able to follow that tutorial?
Obviously I am very new to x86, so any tutorials or advice on that one I found and anything on assemblers would be greatly appreciated if anyone could spare with their advice.
Thanks a lot guys
Learning x86... or... whatever
Re: Learning x86... or... whatever
AS is free. The GNU project provide a free assembler (gas) in its binutils package.
The choice of assembler is less important now - nasm or gas are the most commonly used.
The choice of assembler is less important now - nasm or gas are the most commonly used.
-
- Posts: 7
- Joined: Sun Feb 22, 2009 5:00 am
Re: Learning x86... or... whatever
Okay thanks, I'm just now downloading NASM (and noticing that I've come to a nasm.exe file and a ndisasm.exe file which don't seem to do anything so I'm gonna have to go researching how to use NASM )
But does this mean the tutorial I'm reading is outdated?
But does this mean the tutorial I'm reading is outdated?
Re: Learning x86... or... whatever
You must use nasm from the command line.MinatureCookie wrote:Okay thanks, I'm just now downloading NASM (and noticing that I've come to a nasm.exe file and a ndisasm.exe file which don't seem to do anything so I'm gonna have to go researching how to use NASM )
But does this mean the tutorial I'm reading is outdated?
-
- Posts: 7
- Joined: Sun Feb 22, 2009 5:00 am
Re: Learning x86... or... whatever
Yeah I was just working that out reading the thing on the NASM page, can I be really annoying and ask for some example code of how to compile with NASM through the command-line?
Thank-you
EDIT:
I think I've worked out, it's this (assuming command-line opened up in directory of NASM)
nasm -o Test.com Test.asm
And I write all my x86 in an ASM file, and it comes out as a COM file. I know I get a COM file when I do this, but is it valid, is this right?
Thank-you
EDIT:
I think I've worked out, it's this (assuming command-line opened up in directory of NASM)
nasm -o Test.com Test.asm
And I write all my x86 in an ASM file, and it comes out as a COM file. I know I get a COM file when I do this, but is it valid, is this right?
Re: Learning x86... or... whatever
It's entirely depend on you, .COM files are flat binaries. Meaning that everything you write there is exactly what the computer will do. No segmentation, no headers, no library calls (don't know whether it's possible to do).I know I get a COM file when I do this, but is it valid, is this right?
Re: Learning x86... or... whatever
Hi,
A com file is simply a flat binary. Use nasm -hf for a list of other supported formats (my version also supports aout, elf, coff....).
Cheers,
Adam
A com file is simply a flat binary. Use nasm -hf for a list of other supported formats (my version also supports aout, elf, coff....).
Cheers,
Adam