delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/13/09:16:33

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bank Swapping
Date: Sat, 8 Nov 1997 18:26:30 +0000
Organization: None
Distribution: world
Message-ID: <r$h57DAW7KZ0Ewnt@talula.demon.co.uk>
References: <34621738 DOT 1A22 AT cedarnet DOT org>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 27
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jason Reel writes:
>I don't think this question is necesarily DJGPP specific, but I was
>wondering how you call a real mode function in DJGPP.  Namely, how do
>you call the VESA 1.2 bank swapping function in place of using interrupt
>4f05h?  Any help would be greatly appreciated.

Use the __dpmi_simulate_real_mode_procedure_retf() function from libc.

But, there isn't really any point in using that over the interrupt call.
A direct function call is much faster than an interrupt when used from a
real mode program, but from protected mode they are both grossly
inefficient because the DPMI server has to switch into real mode and
then back to protected mode when the VESA function is finished. This
means that a simple function call is impossible, so the interrupt will
be just as fast.

To write fast VESA code in protected mode, you need the VBE 2.0
extensions. On some hardware this will give you a linear framebuffer,
which totally avoids the need for a bank switch, but whatever the card,
you get a nice pmode interface that lets you copy stubs of bank
switching code into your own address space, where they can be executed
directly...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Pigs use it for a tambourine" - Frank Zappa

- Raw text -


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