Mail Archives: djgpp/2000/05/06/18:20:51
> 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 -