To: djgpp AT delorie DOT com Subject: Re: Retrieving VESA Modes in DJGPP -- HELP! Message-ID: <19970110.151040.8799.0.chambersb@juno.com> References: <32d55634 DOT 1506449 AT news DOT praxis DOT net> From: chambersb AT juno DOT com (Benjamin D Chambers) Date: Fri, 10 Jan 1997 18:11:07 EST 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.) ...Chambers > >Thanks..... >-GENOCiDE > >genocide AT praxis DOT net >