delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/04/21:50:09

From: Brett Leslie Porter <blp01 AT uow DOT edu DOT au>
Message-Id: <199708050149.LAA20334@wumpus.its.uow.edu.au>
Subject: Calling assembly procedures from DJGPP
To: djgpp AT delorie DOT com (DJGPP)
Date: Tue, 5 Aug 1997 11:49:59 +1000 (EST)
MIME-Version: 1.0

Hi DJGPP users!

OK, I've just looked through the FAQ and can't find anything to help me. 
I know it's probably in INFO, but I can't seem to find it.

I'm looking for information on how to set up a C procedure in an .S file, 
how to get parameters off the stack, how to return a value, how to export 
it so C files can call it, all that sort of assembly stuff.

I've NEVER used an assembler to link to C before (I pretty much always 
use inline assembly, but with DJGPP it makes your code look kinda messy 
with all the "clobbered" registers, etc. I'm not having a go at the 
technique: it is better than any other inline assembly I've ever seen in 
a C compiler, it just messes up my prettily formatted code for biggish 
functions).

If it IS in INFO, can somebody please point me in the right direction??

Thanks

Brett Porter

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019