Date: Thu, 10 Jun 1999 17:03:32 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Jay cc: djgpp AT delorie DOT com Subject: Re: how to call BIOS32 service In-Reply-To: <375F0973.148851A5@tpts5.seed.net.tw> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 10 Jun 1999, Jay wrote: > I got a problem. I want to call the BIOS32 service of PCI device > ROMimage.I got the physical address of the BIOS32 sevice. But, how to > call the BIOS32 service on protect mode? I've tested to call BIOS32 > service directly. But it always fail. > > __asm__ __volatile__( " call %%edi \n " > : "=a"( ReturnCode ) This won't work. The `call' instruction is only valid for addresses that are in the CS segment, that is only for the code of your program. BIOS32 code is certainly outside your CS segment. For those cases, you need to use `lcall', and specify the selector as well as the offset. The above assumes that BIOS32 entry point can be called in protected mode; if not, you will have to use the library function called __dpmi_simulate_real_mode_procedure_retf.