www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/23/09:09:36

From: oak9755 AT silver DOT sdsmt DOT edu (Olav Kindt)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: VESA Programming -- oh boy.
Date: 23 Oct 1996 04:37:49 GMT
Organization: South Dakota School of Mines and Technology
Lines: 31
Distribution: world
Message-ID: <54k7eu$83u@news.sdsmt.edu>
References: <1 DOT 5 DOT 4 DOT 16 DOT 19961022112854 DOT 348f28d0 AT dmeasc DOT rc DOT ipt DOT br>
NNTP-Posting-Host: silver.sdsmt.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Cesar Scarpini Rabak (csrabak AT dce03 DOT ipt DOT br) wrote:
: >char *OemStringPtr PACKED;
 
This pointer is a pointer to memory in DOS, usually in the VGA BIOS at
c000 something. The reason the program crashes when you try to print this
is because it doesn't like you fiddling with dosmemory directly. (Without
telling it)

I used this workaround, ( I'm sure there are better ways)

First you calculate the linear address of the first character in the
string. Your OemSStringPtr will be 4 bytes, first two are segment , second
two are offset. Linear address = SEg * 16 + offset.

Then use the dosmemget(linearaddres, 1, &Placetoputchar) to get the value
of the first character. Increment the linear address, and get next until
the '\0' character is read.

Another thing is that some cards might piggyback this string, (and also
the supported mode list) into the unused area of the VESAINFO block. In
that case you have to figure out where the __tb (I'm assuming you are
using the transfer buffer for getting the VESAINFO block), and find the
values in that position. 

I have some code doing this, and I can mail it to you if you still can't
figure this thing out.

 -- Olav Kindt		     | email:
oak9755 AT silver DOT sdsmt DOT edu
737 E. Anamosa Street #103   |		xedb_oak AT debet DOT nhh DOT no
Rapid City SD-57701	     | 		MAIL me man.......

- Raw text -


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