www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/10/09:54:59

Message-Id: <s4166e7f.088@pob.rwdi.com>
Date: Wed, 10 Sep 1997 09:56:58 -0400
From: Brad Fidler <BF AT rwdi DOT com>
To: djgpp AT delorie DOT com
Subject: Curious about selectors
Mime-Version: 1.0

Lots of posts here ask about the best way to access
video memory, well I have been thinking about this 
lately and have a few questions on selectors in
general.

There seems to be 3 accepted ways of accessing 
video memory, near pointers (FAT DS Hack)
              far pointers  (use FS)
              make a custom selector to video area

With near pointers your programs area is set to the
4Gb limimt but wont work with NT
Q)So this got me wondering, what is your programs 
DS selectors value normally? Is it a default
value? is it related to your programs size?
what happens to it if you malloc large chunks of
memory? is it dynamically resized?

Now with far pointers or custom selectors, to access
a memory loctaion you will have to use ES,FS,or GS
but this causes a default selector override and
causes a 1 clock penalty for each access. I seem
to remember reading (from Shawn Hargreaves?) that
near pointers are only about 5 percent faster than
farpointers? Is this why? is there any way to get
around this?(probably not)
Its a minor thing but hey 5 percent is still 5
percent!(but that 5% probably isn't worth
disabling memory protection with a Fat DS!)

Kind of a long post, sorry.

Brad Fidler
Wind Engineering Consultants
Guelph Ontario Canada
www.rwdi.com
bf AT rwdi DOT com




- Raw text -


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