www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/22/09:47:17

Date: Tue, 22 Oct 1996 13:32:07 -0300
Message-Id: <1.5.4.16.19961022112854.348f28d0@dmeasc.rc.ipt.br>
Mime-Version: 1.0
To: mohan AT stealth DOT net (Mohan Khurana), djgpp AT delorie DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: VESA Programming -- oh boy.

At 02:14 22/10/96 GMT, Mohan Khurana wrote:
>I have a structure, which is the VbeInfoBlock structure that contains
>the VESA spec version, memory, etc.
>
>I make a structure like this:
>
>struct VbeInfoBlock vesastruct;
>
>Then I go through the normal procedure for getting a pointer to the
>structure, using dpmi functions.
>
>If I print the version number, defined in the struct as: 
>
>short   VbeVersion PACKED;
>
> I will get a successful and expected result of 200, here is the line
>I used:
>
>print("%x", vesastruct->VbeVersion);
>
>Inside this structure there is a pointer called "OemStringPtr" defined
>in the struct statement as:
>
>char *OemStringPtr PACKED;
>
>If I try to print this pointer to a null terminated string, using the
>following line:
>
>printf("%s", vesastruct->OemStringPtr);
>
>I get the following error:
>
>Exiting due to signal SIGSEGV
>General Protection Fault at eip=00004a5a
>eax=00000000 ebx=00000000 ecx=ffffffff edx=00000025 esi=c00074ac
>edi=c00074ac
>ebp=00047624 esp=0004626c cs=00a7 ds=00af es=00af fs=0087 gs=00c7
>ss=00af
>Call frame traceback EIPs:
>  0x00004a5a
>  0x00001fc1
>  0x000015c1
>  0x000015f5
>  0x00001b33
>
>The specs say that OemStringPtr is a real mode far pointer in
>protected mode.  How do I access it?
>
>Please help.  I have been trying to figure this out for a while now.
>
>
In the grx20 package there is a programa called vesainfo there. You can look
a its sources.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-35221Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


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