delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/31/06:30:32

Date: Wed, 31 May 2000 09:26:00 +0200 (MET DST)
From: Gisle Vanem <giva AT bryggen DOT bgnett DOT no>
To: djgpp AT delorie DOT com
Subject: Re: Inline asm: lcall & various binutils versions
Message-ID: <Pine.UW2.3.95.1000531092156.22132A-100000@bryggen.bgnett.no>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Richard Dawe <richdawe AT bigfoot DOT com> said:

>I took a look at this problem at the weekend and I couldn't find a way to
>avoid this syntax. I tried loading the selector into es and then
>referencing the offset's memory location, like so:
>
>lcall %%es:_myoffset

How about something like this:

 __dpmi_paddr entry;
 entry.selector = your_selector;
 entry.offset = func_offset;
 __asm__ __volatile__ (
          "lcall (%%edi)"
          :: "D" (&entry) );

I've used this in a BIOS32 service module.

Gisle V.

- Raw text -


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