From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: segment overrides Date: Tue, 14 Apr 1998 22:41:36 -0400 Organization: Two pounds of chaos and a pinch of salt. Lines: 29 Message-ID: <35341E60.114F@cs.com> References: <27B5A316D6D AT fharga DOT sun DOT ac DOT za> NNTP-Posting-Host: ppp203.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk MNR. LE SMITH wrote: > > hi > > could someone please give me a painfully detailed explanation of > segment overrides... I'm not qualified to do this, but... > .. i understand it's an extra intruction one has to make before EACH > and EVERY memory access.. (doesnt this kill execution speed totally?) If you are referring to the _farpokeX()/_farpeekX() convention, then you don't necessarily have to override the segment register each time. In fact, it only takes one extra cycle, but if you're down to counting individual cycles, you can replace any loop that uses _far*() with a call to _farns*(), assuming you call _farsetsel() beforehand. Note that the only way to guarantee that this will work properly is to make NO library function calls except for _farns*() inside the loop. Look up _far* in the libc documentation for more info. -- --------------------------------------------------------------------- | John M. Aldrich | "A woman is not property, and hus- | | aka Fighteer I | bands who think otherwise are living | | mailto:fighteer AT cs DOT com | in a dreamworld." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------