delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/16/08:31:35

Date: Wed, 16 Oct 1996 14:07:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Olav Kindt <oak9755 AT silver DOT sdsmt DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: VESA pointers ... again
In-Reply-To: <541tg8$8fo@news.sdsmt.edu>
Message-Id: <Pine.SUN.3.91.961016140445.22571C-100000@is>
Mime-Version: 1.0

On 16 Oct 1996, Olav Kindt wrote:

> In the vesainfo struct I have:
> 	struct vesainfo{
> 		...
> 		WORD *Vesamodes;	(WORD = ushort)
> 		..}
> 
> 	Now the problem is that this (i think) is a far pointer into DOS
> memory somewhere.

WORD is 16 bit, so it cannot be a far pointer (which is stored as a 
DWORD, i.e. 32 bit).

> dosmemget for each vesamode until vesamode == FFFF. BUT the linear address
> i get seems just plain wrong to me.

Did you declare the above struct as packed?

> What would the correct order of the
> seg:offset in the Vesamode variable be: is it HiWord = Segment, LoWord ==
> Offset, or the other way around?

Usually, if the far pointer is a 32-bit int, its higher 16 bits are the 
segment and lower 16 bits are the offset.

- Raw text -


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