www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/06/18:20:51

Date: Sat, 6 May 2000 17:40:25 -0400 (EDT)
Message-Id: <200005062140.RAA07169@indy.delorie.com>
From: Eli Zaretskii <eliz AT delorie DOT com>
To: "Paul Crone" <paul AT pkcrone DOT globalnet DOT co DOT uk>
CC: djgpp AT delorie DOT com
In-reply-to: <007f01bfb76e$0020d320$2f5293c3@pkcrone>
(paul AT pkcrone DOT globalnet DOT co DOT uk)
Subject: Re: inline asm problem
References: <007f01bfb76e$0020d320$2f5293c3 AT pkcrone>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Paul Crone" <paul AT pkcrone DOT globalnet DOT co DOT uk>
> Date: Sat, 6 May 2000 16:14:57 +0100
>
> inline void set_vesa_bank_pm(int bank_number)
> {
>    asm (
>    " call *%0 "
>     :                             /* no outputs */
>     : "r" (pm_bank_switcher),     /* function pointer in any register */
>    "b" (0),                    /* set %ebx to zero */
>    "d" (bank_number)           /* bank number in %edx */
> 
>     : "%eax",                     /* clobber list (we have no way of */
>    "%ebx",                     /* knowing which registers the VESA */
>    "%ecx",                     /* code is going to change, so we */
>    "%edx",                     /* have to assume the worst and list */
>    "%esi",                     /* them all here) */
>    "%edi"
>    );
> }
> 
> 
> Errors reported against 3rd line of code segment:
> "Invalid 'asm' statement"
> "fixed or forbidden register 1 (dx) was spilled for class DREG"

You need to change this inline assembly.  Section 8.17 of the DJGPP
FAQ should help you do this: it points to a page on the GCC site that
explains how to do that.

- Raw text -


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