www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/16/20:10:14

From: y0000980 AT ws DOT rz DOT tu-bs DOT de (Andree Borrmann)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Retrieving VESA Modes in DJGPP -- HELP!
Date: 16 Jan 1997 12:33:20 GMT
Organization: Technische Universitaet Braunschweig, Germany
Lines: 30
Sender: y0000980 AT rzab8 DOT rz DOT tu-bs DOT de (Andree Borrmann)
Distribution: world
Message-ID: <5bl76g$e8f@ra.ibr.cs.tu-bs.de>
References: <32d55634 DOT 1506449 AT news DOT praxis DOT net> <19970110 DOT 151040 DOT 8799 DOT 0 DOT chambersb AT juno DOT com>
NNTP-Posting-Host: rzab8.rz.tu-bs.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <19970110 DOT 151040 DOT 8799 DOT 0 DOT chambersb AT juno DOT com>, chambersb AT juno DOT com (Benjamin D Chambers) writes:
|> On Thu, 09 Jan 1997 20:40:57 GMT genocide AT praxis DOT net (GENOCiDE) writes:
|> >Ok, in my struct, there is a pounter called VideoModePtr;
|> >
|> >struct VbeInfoBlock {
|> >   ....
|> >   unsigned *VideoModePtr;
|> >   ....
|> >};
|> >
|> >I should be able to retrieve all the video modes by using:
|> >
|> >VbeInfoBlock vbeinfo;
|> >unsigned *p;
|> >for (p=vbeinfo.VideoModePtr; *p != (unsigned) -1; p++) {
|> >   printf("Mode: 0x%x\n", *p);
|> >}
|> >
|> >this works under regular ANSI C, why doesn't work here? is it because
|> >of protected mode?  Please help me!

|> The address returned is a RM address.  You need to convert it to a PM
|> address (I believe with _dos_ds, the FAQ explains how to do this.)


Just do a "dosmemget" into your program memory...
And you better use a "short unsigned *" for the modelistpointer- DJGPP is a 32bit-compiler!

Bye,
Andree

- Raw text -


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