Mail Archives: djgpp/1996/10/18/13:14:25
Joonas W N Reynders (reynders AT cc DOT Helsinki DOT FI) wrote:
: If I have a segment:offset (16:16) pointer to a function (this
: case the bank switch function ptr returned by a VESA GetModeInfo function),
: how can I call it directly? The bank switch interrup is too slow...
:
:
: Thaks in advance,
:
: Joonas
:
: PS. Email would be nice: I allways forget that I've posted something ;)
I've used this piece of code with luck
__dpmi_regs regs;
regs.x.bx = 0; // Set page
regs.x.dx = page; // Page number
regs.x.cs = FuncPtr >> 16; // Segment of function ptr
regs.x.ip = FuncPtr & 0x0000ffff; // Offset of function ptr
regs.x.ss = regs.x.sp = 0; // Think this must be zero
__dpmi_simulate_real_mode_procedure_retf(®s);
// Not excactly sure about the spelling of that function call
Note if you are making a function out of this, it would help if you made
it inline, or defined it as macro to get rid of parameter passing
overhead.
Check out the online manuals at www.delorie.com for the correct
spelling on the function call.
BTW. Is there any body out there who knows how to do this in inline asm?
That might be even faster.
--
Olav Kindt | email: oak9755 AT silver DOT sdsmt DOT edu
737 E. Anamosa Street #103 | xedb_oak AT debet DOT nhh DOT no
Rapid City SD-57701 | MAIL me man.......
- Raw text -