hi all,
Is there is assembly Compilers and linkers for linux?
or Unix?
or any other operating system like MacOS or Solaris.
amr
Is there is assembly Compilers and linkers for linux?
or Unix?
or any other operating system like MacOS or Solaris.
amr
I use FASM :)
But you can also use GAS/GASM, NASM and a few others. See our FASM forum or www.linuxassembly.org for more info :)
But you can also use GAS/GASM, NASM and a few others. See our FASM forum or www.linuxassembly.org for more info :)
With Linux and Intel/AMD
isn't this rather a question of the assembler, but of the linker ?
isn't this rather a question of the assembler, but of the linker ?
With Linux and Intel/AMD
isn't this rather a question of the assembler, but of the linker ?
Well, you need an assembler which outputs an object file format, readable by the linker.
ELF would be the best in that case, but COFF would do it too, with COFF emulation in GCC.
But remember that COFF != MS COFF.
You can use objcopy in binutils to convert a COFF object file into an ELF object file before you feed to ld. But, as is usual with any app beginning with 'g', it works, but not always.
One other option is to 'compile' using gcc. Anyone who actually read gcc source would know that gcc preprocess an input file with extension ".S" (must be in upper case) with cpp and then feed to whatever assembler which gcc is configured for. So you can pretend that you are 'compiling', not assembling.
As for GAS...
If you plan to work on something using FPU, GAS with AT&T syntax is not recommended. It has a 'bug' with fdiv(r) and fsub(r). GAS developers claim that this is for the compatibility with old stupid SCO SysV assembler, for which gcc 386 code generator had been created and never been updated since for other OS (e.g. Linux). Get GAS version 2.10 or higer and use Intel syntax support by writing .intel_syntax noprefix at the top of the source code. Otherwise you may have to inspect the listing whether the generated opcode is correct.
One other option is to 'compile' using gcc. Anyone who actually read gcc source would know that gcc preprocess an input file with extension ".S" (must be in upper case) with cpp and then feed to whatever assembler which gcc is configured for. So you can pretend that you are 'compiling', not assembling.
As for GAS...
If you plan to work on something using FPU, GAS with AT&T syntax is not recommended. It has a 'bug' with fdiv(r) and fsub(r). GAS developers claim that this is for the compatibility with old stupid SCO SysV assembler, for which gcc 386 code generator had been created and never been updated since for other OS (e.g. Linux). Get GAS version 2.10 or higer and use Intel syntax support by writing .intel_syntax noprefix at the top of the source code. Otherwise you may have to inspect the listing whether the generated opcode is correct.
There are several assembler for linux, the main is GAS (or AS) who come whit the GCC package, is a exelent assembler, but it has a drawback, it's sintax is ATT's, which is diferent(not necesary bad) from MASM, if you had worked with UNIX before is a plus, but if you come from windows, its a diferent world.
there is also NASM, ist sintax is almost the same tah MASM, but more logical,
FASM is another option, also very similar to MASM.
Finaly there is HLA, it is actualy a preprocesor, developed by Randal Hyde in windows it output masm compatible source, in linux it work with GAS, and Profesor Hyde is tinking in writing it for NASM, HLA is Diferent to anything else, but it comes with a byg plus, an extensive library of routines for almost anything, give it a try it addres is http://webster.cs.ucr.edu you won't regret it
Carlos Pacheco
Posted on 2002-09-19 20:55:07 by Carlos
there is also NASM, ist sintax is almost the same tah MASM, but more logical,
FASM is another option, also very similar to MASM.
Finaly there is HLA, it is actualy a preprocesor, developed by Randal Hyde in windows it output masm compatible source, in linux it work with GAS, and Profesor Hyde is tinking in writing it for NASM, HLA is Diferent to anything else, but it comes with a byg plus, an extensive library of routines for almost anything, give it a try it addres is http://webster.cs.ucr.edu you won't regret it
Carlos Pacheco
Posted on 2002-09-19 20:55:07 by Carlos
Is there are any tutorails for linux programming ?
thanks
thanks
Uhhh.... did you actually look at the link I gave you ( www.linuxassembly.org ) ?
It has a big button saying "Tutorial" on the left :rolleyes:
It has a big button saying "Tutorial" on the left :rolleyes:
Also I can recomend you http://developer.gnome.org/ and the section there: http://developer.gnome.org/doc/books/
This book: GTK+/Gnome Application Development, by Havoc Pennington
GNOME application programming manual, available in book form and online.
And if you whant to do some things in asm. In the nasm home page, there search for gtk or gnome, there you will find some examples covering how to compile and link a example by n u M I T_o r that will guide you in your first example, then you can read that book, and do this things in nasm.. or the assembler of your choice ;)
That is for do some gtk applications sure, also you wil understand a little what is X and suchs things. By the way, now I use redHat 9 :D
[-------------------------------------------------------]
I recompiled a little the links, I give you (whit repetitions.. you will understand..)
linux QT or gtk or x ?
XLib sample
gtk samples This last two from Example Code
Also you can read:
.drpaulcarter book and the FAQ
Have a nice day or night.
This book: GTK+/Gnome Application Development, by Havoc Pennington
GNOME application programming manual, available in book form and online.
And if you whant to do some things in asm. In the nasm home page, there search for gtk or gnome, there you will find some examples covering how to compile and link a example by n u M I T_o r that will guide you in your first example, then you can read that book, and do this things in nasm.. or the assembler of your choice ;)
That is for do some gtk applications sure, also you wil understand a little what is X and suchs things. By the way, now I use redHat 9 :D
[-------------------------------------------------------]
I recompiled a little the links, I give you (whit repetitions.. you will understand..)
linux QT or gtk or x ?
XLib sample
gtk samples This last two from Example Code
Also you can read:
.drpaulcarter book and the FAQ
Have a nice day or night.
amr,
if you already code using MASM or TASM syntax, you can check this tool http://www.asmcommunity.net/board/index.php?topic=15587
is a linker for linux
ancev
if you already code using MASM or TASM syntax, you can check this tool http://www.asmcommunity.net/board/index.php?topic=15587
is a linker for linux
ancev
Is there are any tutorails for linux programming ?
thanks
The Art of Assembly Language (electronic version) has a Linux-specific edition.
The published edition has been edited to work with both Windows and Linux.
http://webster.cs.ucr.edu
Cheers
Randy Hyde