delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/28/04:57:18

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE3239523@probe-2.Acclaim-Euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: VESA 1.2 banked - How do I call a far pointer function in DJG
PP?
Date: Wed, 28 Oct 1998 09:55:23 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

Jonathan Villani writes:
> I would like to know how to call a far pointer function in DJGPP. 

You can use __dpmi_simulate_real_mode_procedure_retf() for this, but 
be warned that it will be painfully slow. Calling any 16 bit real mode 
routines from a 32 bit protected mode program involves a CPU mode 
switch, which takes so long that it doesn't make much difference how 
you actually trigger this call (Allegro uses interrupts for VESA 1.x 
bank switching, and I couldn't measure any speed difference when I 
tried changing it to use far calls instead).

For fast graphics, you need to avoid these calls altogether. That 
means cutting down the number of bank switches to an absolute minimum, 
or even better ditching VESA 1.x altogether and using some more 
capable driver interface like VBE 2.0 or VBE/AF.

	Shawn Hargreaves.

- Raw text -


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