hi all,
Is there is assembly Compilers and linkers for linux?
or Unix?
or any other operating system like MacOS or Solaris.
amr
Posted on 2002-09-18 03:02:28 by 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 :)
Posted on 2002-09-18 03:33:16 by bazik
With Linux and Intel/AMD
isn't this rather a question of the assembler, but of the linker ?
Posted on 2002-09-19 05:11:16 by beaster

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.
Posted on 2002-09-19 06:14:41 by bazik
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.
Posted on 2002-09-19 18:11:34 by Starless
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
Is there are any tutorails for linux programming ?
thanks
Posted on 2002-09-23 00:19:37 by amr
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:
Posted on 2002-09-23 00:47:30 by bazik
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.
Posted on 2004-01-01 11:01:41 by rea
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
Posted on 2004-01-01 11:38:36 by 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
Posted on 2004-01-02 10:57:43 by rhyde