[comp.lang.c] Assembly language subroutines for use with C

segedy@gsg.UUCP (Catherine Segedy) (07/31/87)

In article <3647@watdcsu.waterloo.edu> ryders@watdcsu.UUCP writes:

>How does one go about writing an assembly function that can be linked
>and used by a C program? 

(BTW -- actually, I can't find the original article here.  I just copied someone
elses reference so I'm sorry if I messed up. )

I don't know if your 'C-compiler has it or not, but often there is a switch
to the 'C-compiler to produce assembler code. ( -s, -S, something like that?)
anyway, what I usually do is make a dummy function with all the correct
parameters, compile with said switch, and then fill in the assembly body.
(I know, that's cheating!  :-)  )

					Cathy Segedy

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
decvax!gsg!segedy

I am not a liberated woman because I have ALWAYS been free.
			Thanks MOM, thanks DAD, for raising me right!

my views are my own and are not necessarily those of my employer, my
co-workers, or my teddy-bear!!