PDA

View Full Version : inline asm on a sparc



Alien_Freak
04-13-2002, 08:39 PM
hi all,

i'm trying to include some basic x86 code as inline assembly in a C program. worked fine on my own pc i was using nasm && gnu lib gcc/g++ as my compilers.

my only real question is does any1 know if A. SunOS 5.7 supports x86 assembler...

and B. if any1 know what the assembler is called.

also, can gnu gcc/g++ compiler be used to assemble code?

i know it can generate asm code with the -s option but i haven't seen anything that allows it to be used as an assembler.

PS. not sure on the specs of the system but i'm quite sure it's a sparc box.

Thanks again for any help,
the busy little alien that could :-D

Salem
04-14-2002, 12:43 AM
> A. SunOS 5.7 supports x86 assembler
No, it supports sparc assembler
You don't really want to write in sparc assembler

> B. if any1 know what the assembler is called.
Most unix assembers are called 'as'

> also, can gnu gcc/g++ compiler be used to assemble code
Yes, read the manual
_asm is the keyword IIRC