delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/09/26/04:19:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Lines: 17
X-Admin: news AT aol DOT com
From: jbs30000 AT aol DOT com (JBS30000)
Newsgroups: comp.os.msdos.djgpp
Date: 26 Sep 2004 07:41:58 GMT
Organization: AOL http://www.aol.com
Subject: Strange VESA problem
Message-ID: <20040926034158.24216.00001082@mb-m10.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I have a dual boot computer, I can either boot into Windows XP or DOS from
Windows 98 ( from http://newdos.yginfo.net/msdos71/index.htm).
Anyway, I'm messing around geting VBE info with function 0 and then printing it
out on the screen, and, under the DOS box from Windows XP, everything runs
fine, but try to run my program under pure DOS and none of the strings return
anything.
I called my VBE info block structure "vesainfo".  For an exaple, using long
OEM_String_PTR I'll show how I get the string to print.
I have variables char OEM_String[255]; and short Real_Mode_PTR;
To get the OEM String pointer:
Real_Mode_PTR = ((vesainfo.OEM_String_PTR >> 16)  << 4) +
(vesainfo.OEM_String_PTR & 0xFFFF);
        dosmemget(Real_Mode_PTR & 0xFFFF, 255, &OEM_String);
Now, if I 
printf("Chipset or OEM              %s \n", &OEM_String);
under Windows XP DOS box, it prints out the string, but under pure DOS, it
doesn't.  Does anybody have any ideas why?  Thanks.

- Raw text -


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