i am a novice to this style(started about 5mins ago), what kind of assembly should i use? will i need anything special? how do set up an assembly cross compiler...? anything else you might deam usfull would be alot' o' help...
ps. ^__^
asembly stuff
Re:asembly stuff
what do you mean with "assembly cross compiler" ???
By definition, asm is dependent on one architechture family, and we speak about assembler (not compiler), there is some compilers that allow you to use inline assembly, but imho, if you are new to asembly and want to learn use somthing like NASM since it simplify asm coding and its syntax is similar to intel assembler.
By definition, asm is dependent on one architechture family, and we speak about assembler (not compiler), there is some compilers that allow you to use inline assembly, but imho, if you are new to asembly and want to learn use somthing like NASM since it simplify asm coding and its syntax is similar to intel assembler.
Re:asembly stuff
please keep the insults comming,i jus found out there assemblers insted of compilerrs thanks man.....
dude, i am like the biggedst newbie to asmbly...i dont know anything about it. i think the file extention is .asmb, and thats all i know.
i usually use c for OSD, but i encountered some things that require a low level style...a web site would be nice, even the basics would be good too...
i googled a search, but there are 1.0004345E13 results...did not know ware to start...
dude, i am like the biggedst newbie to asmbly...i dont know anything about it. i think the file extention is .asmb, and thats all i know.
i usually use c for OSD, but i encountered some things that require a low level style...a web site would be nice, even the basics would be good too...
i googled a search, but there are 1.0004345E13 results...did not know ware to start...
Re:asembly stuff
Assemblers are architecture dependant. The easiest assembler to learn the syntax for would be NASM/YASM. These 2 assemblers can only produce code for x86 and x86/x86-64 respectively. GCC uses AT&T Syntax assembly though, if you want to use that syntax then you can use GAS. GAS can compile the assembly onto various architectures (at least every architecture that linux supports since GCC really just converts C code to AT&T Assembly then GAS converts it to machine code).
The file extension, although completely irrelevant since you can use any extension, especially when it comes to Linux, is .asm (Intel) or .S (AT&T).
If you've ever used inline assembly and don't know Intel syntax then you may as well just stay with GAS, google for "AT&T Assembly" for tutorials and so forth.
The file extension, although completely irrelevant since you can use any extension, especially when it comes to Linux, is .asm (Intel) or .S (AT&T).
If you've ever used inline assembly and don't know Intel syntax then you may as well just stay with GAS, google for "AT&T Assembly" for tutorials and so forth.
Re:asembly stuff
You can find an excellent beginner's text here:
http://www.drpaulcarter.com/pcasm/
The NASM assembler can be found here:
http://nasm.sourceforge.net/wakka.php?wakka=HomePage
NASM has binaries available for Windows and many other OS (If you use Linux/BSD it's probably already installed).
To enter code just use your favourite text editor.
If your editor has syntax highlighting based on the file extension then the extension is probably .asm
All this is for x86 systems, if you're on Mac then you'll need different tools.
Hope that helps.
http://www.drpaulcarter.com/pcasm/
The NASM assembler can be found here:
http://nasm.sourceforge.net/wakka.php?wakka=HomePage
NASM has binaries available for Windows and many other OS (If you use Linux/BSD it's probably already installed).
To enter code just use your favourite text editor.
If your editor has syntax highlighting based on the file extension then the extension is probably .asm
All this is for x86 systems, if you're on Mac then you'll need different tools.
Hope that helps.
Re:asembly stuff
Possibly worth mentioning... from GCC manpage:AR wrote: The file extension, although completely irrelevant since you can use any extension, especially when it comes to Linux, is .asm (Intel) or .S (AT&T).
Code: Select all
For any given input file, the file name suffix determines what kind of compilation is done:
[....]
file.s
Assembler code.
file.S
Assembler code which must be preprocessed.
Re:asembly stuff
so what your saying is that, depending on the style of asmebly, i can compile code that will work on various types of processors?
Re:asembly stuff
What he's saying is that if you write assembler, then it will be instruction set dependant. The "x86" that was mentioned is another name for "IA-32" which is the instruction set architecture that all PC's use: whether you use a 386, 486, Pentium (1,2,3,4) or some AMD or Via stuff, the same code will work, because they all use the same instruction set architecture (ISA).
You can write processor dependant code though: code that uses MMX extension won't work on processors that don't support that. There are other such extension, small and big.
Finally, if you are writing assembler, and then you are limited to single ISA at a time. Even if you didn't use any extension, if you are writing x86 code, then it will never work on Macintosh, because the Apple's computers use PowerPC processors, which are totally different. PowerPC isn't the only different processor architecture either. Just like PowerPC is different from IA-32, so is Sparc (used in most Suns) is totally different from PowerPC and IA-32. Or how about VAX? Or m86k ?
So when you are writing assembler, you need to write for one "ISA" or "architecture" for short. It will then run (with some restrictions) on all the processors that use that specific architecture. If you want it to run on some other architecture, then you need to rewrite your code for that architecture.
When using a "high-level" programming language like C, the compiler translates your "abstract code" to the assembler language of your target architecture. Even then, your compiler will have to support the specific architecture, and if you want to have your C code work on several, then you will have to compile it several times.
Hope that clears a bit?
You can write processor dependant code though: code that uses MMX extension won't work on processors that don't support that. There are other such extension, small and big.
Finally, if you are writing assembler, and then you are limited to single ISA at a time. Even if you didn't use any extension, if you are writing x86 code, then it will never work on Macintosh, because the Apple's computers use PowerPC processors, which are totally different. PowerPC isn't the only different processor architecture either. Just like PowerPC is different from IA-32, so is Sparc (used in most Suns) is totally different from PowerPC and IA-32. Or how about VAX? Or m86k ?
So when you are writing assembler, you need to write for one "ISA" or "architecture" for short. It will then run (with some restrictions) on all the processors that use that specific architecture. If you want it to run on some other architecture, then you need to rewrite your code for that architecture.
When using a "high-level" programming language like C, the compiler translates your "abstract code" to the assembler language of your target architecture. Even then, your compiler will have to support the specific architecture, and if you want to have your C code work on several, then you will have to compile it several times.
Hope that clears a bit?