www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/20/14:07:24

From: Luke Hutchinson <lhutchin AT mail DOT usyd DOT edu DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DPMI + VESA problem
Date: Mon, 18 Nov 1996 17:38:59 +1000
Organization: Information Technology Services, The University of Sydney, NSW, Australia
Lines: 25
Distribution: inet
Message-ID: <32901293.356E@mail.usyd.edu.au>
References: <56hksh$d4e$1 AT ns DOT felk DOT cvut DOT cz>
Reply-To: lhutchin AT mail DOT usyd DOT edu DOT au
NNTP-Posting-Host: modem-b-71.mp.usyd.edu.au
Mime-Version: 1.0
To: Jaroslav Kamenik <stone AT atrey DOT karlin DOT mff DOT cuni DOT cz>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jaroslav Kamenik wrote:
> 
>   My code which plays with VESA functions hung at exit.
>
<clip:code>
> 
>   After printing last mode info, it blew some black lines and hungs.
> 
>                                                                 Stone

I noticed two problems in your code.  Firstly, when calling
__dpmi_simulate_real_mode_interrupt, you MUST have SS, SP & the flags
valid, or 0 in which case DPMI will create a 30 byte stack for you.  The
reason is that if an interupt occurs, then the flags, CS, and IP will be
pushed into some random memory location!

Secondly, though probably not as important, is that while your VESAInfo
struct is the size of a VBE2 extended VBE info structure (512 bytes),
your only getting the VBE1.? (256 bytes) structure.  To get the VBE2
extended VBE info (if it's available), you must place the string 'VBE2'
at the start of the buffer you pass to VBE to fill.

Luke


- Raw text -


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