I know how to use Asm into a C program (sometimes very useful...), but is there a way to use C into an asm program ?

Thanx, Saiwa :confused:
Posted on 2001-11-11 16:23:12 by Saiwa
Inline C, no. But you can link your asm file against a .obj created by
a C compiler. You just need to sort out name decoration, and create
a PROTO in masm.
Posted on 2001-11-11 18:18:03 by f0dder
Just outa curriosity, while were on this subject..

There is about a half dozen versions of C and C++ that i can think of... but what is best suited for MASM32's .obj linker?? Anyone know off hand?

Way before i got into MASM i use to program TC++ (what got me "walking" before i got here and ended up "running" :) ). But im pretty sure the borland .obj format is incompatable.

Experts?? :)

NaN
Posted on 2001-11-12 00:25:11 by NaN
You'll need a C compiler that produces COFF output. LCC-win32 does
and microsoft visual C++ does. GNU GCC also does, but their pc-relative
relocation format is incompatible with the M$ format (or rather, micro$oft
once again took something and made just enough changes to it
that they made it incompatible with the standard). There are tools
around to convert OMF->COFF, but not all of them work very well...
but you might be able to use them if you have "simple" OMF files.
And of course you'll have to use a 32bit C compiler :grin:
Posted on 2001-11-12 07:04:51 by f0dder
Well that pretty well settles it for me...

Masm it is :)

Thanx f0dder for your help on which version of C will work with my compiler... :grin:

NaN
Posted on 2001-11-12 11:05:29 by NaN
Argh. ASSEMBLER. /me kicks NaN in the shin. :grin:
Posted on 2001-11-12 11:15:21 by f0dder