Mail Archives: djgpp/2004/09/26/04:45:35
JBS30000 <jbs30000 AT aol DOT com> wrote:
> 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);
You shouldn't have that "&" there before OEM_String. (I think it
works, but it's logically wrong.)
> Now, if I
> printf("Chipset or OEM %s \n", &OEM_String);
Again a "&" too much.
> under Windows XP DOS box, it prints out the string, but under pure DOS, it
> doesn't. Does anybody have any ideas why? Thanks.
Not really but I'd make OEM_String_PTR unsigned and throw in "&
0xffff" to mask the segment value after shifting it 16 bits to be sure
that you'd get a positive segment offset. (But that might be
unnecessay after you make the variable unsigned.)
Another thing to check is if your call to get "vesainfo" filled in
succeeded or not.
Right,
MartinS
- Raw text -