Message-ID: <3265850F.7EE9@gbrmpa.gov.au> Date: Thu, 17 Oct 1996 08:59:59 +0800 From: Leath Muller Reply-To: leathm AT gbrmpa DOT gov DOT au Organization: Great Barrier Reef Marine Park Authority MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: VESA pointers ... again References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > > 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. Bascially, this is right... :) But its still kinda strange how it is stored. The segment (4 bits) is stored in the most significant bits of the first data _word_ and the offset is stored in the second _word_. The VESA mode specs stats that you have to declare the pointer as a long, or 4 bytes. To get the correct address you need to do something like: In your structure, have: unsigned long VesaModeList; In your program have: unsigned int DosAddress; DosAddress = ((VesaModeList & 0xFFFF0000) >> 12) | (VesaModeList & 0xFFFF); Leathal.