Mail Archives: djgpp/1998/10/28/04:57:18
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 -