Message-ID: <33BB72C2.B1ADF07B@abc.se> Date: Thu, 03 Jul 1997 11:37:06 +0200 From: Henrik Baarnhielm MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: VESA 1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk >>or is it possible to call the real-mode address from protected mode? >>If so how? > >You could use DPMI function 0x0301 (via the libc routine >__dpmi_simulate_real_mode_procedure_retf()), but there's no great >advantage in using that over calling the real mode interrupt: both >methods require the expensive mode switch. For fast graphics, VBE 2.0 >is the way to go... I have succesfully made the above call, and it works and seemed to go faster than the interrupt, but maybe it was only as it seemed. I tried to get the pmode-bankswitch-functions with the VBE function 0ah. I use bankswitch because my card doesn't have LFB, it has only VBE 1.2 built in. I also get a memoryaddress that I have to map. The VBE 2.0 specs says I should allocate a new descriptor and set it's address and size to the values I got from the 0ah call and when I call the pmode-bankswitch I should load ES with the descriptor. That is what I don't know how to do? I allocated a ldt with the libc-function __dpmi_allocate_ldt_descriptors and set it's address and size with __dpmi_set_segment_base_address and __dpmi_set_segment_limit and I locked the memory with __dpmi_lock_linear_region. But how do I put the ldt in ES before I call? I tried to use this inline asm: asm volatile("movw %%bx,%0 movw %%dx,%1 movw %$es,%2" : :"b" (temp),"d" (bank),"r" (ldt) :"%bx","%dx","$es"); but the compiler doesn't like es. It would be nice if some of you Gurus could help me. I have been helped by the Allegro-source a couple of times before, but not this time. I couldn't even find any bankswitch-call.... your help would be appreciated Shawn or any other of you Masters.... Thank you -- *************************************** Internet : Henrik DOT Baarnhielm AT abc DOT se Fidonet : Henrik Baarnhielm, 2:201/235 ***************************************