delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/01/13:26:09

Date: Fri, 1 Aug 1997 10:25:18 -0700 (PDT)
Message-Id: <199708011725.KAA16373@adit.ap.net>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: djgpp & asm obj & registers

Jason Meehan wrote:
>I'm trying to interface to an asm obj that uses the stack to pass
>variables. So what I need to know is how do I tell Djgpp not to mess
>with certain registers(ebx,ecx,edx,esi,edi,es) so that my program wont
>crash.
>thanks.
You could use the switch -ffixed-* (see the GCC docs), but I'd guess GCC
will have an awfully hard time generating code using only one register. Your
best bet might be to put an asm wrapper around the function that saves the
registers and restores them later.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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