delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/24/08:05:00

From: ovek AT arcticnet DOT no (Ove Kåven)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Another way to access VGA memory
Date: Thu, 24 Oct 1996 08:22:37 GMT
Organization: Vplan Programvare AS
Lines: 20
Message-ID: <54n92c$hbr@troll.powertech.no>
References: <961023180905_339586309 AT emout17 DOT mail DOT aol DOT com>
NNTP-Posting-Host: alwayscold.darkness.arcticnet.no
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Emil0 AT aol DOT com wrote:

>Using near pointers in no quicker because you still have to
>load the %edi register with your pointer and then no doubt add some stuff to
>this to access the right pixel. With my method you load %es or whatever and
>then load stuff into %edi to point to the right pixel  - so it is not slower
>(apart from perhaps another register to save on the stack, although a push
>and a pop will hardly slow a program down even if done hundreds of times a
>second).

Not just pushing, loading a segment register is also slow. On a 486
loading a general register usually takes 1 clock, but loading a
segment register takes at least 9 clocks, mostly due to the additional
memory accesses for loading the segment shadow registers.
Then you have all the segment prefixes, which I've heard might slow
down a PPro (though I'm not quite sure about that, maybe that was only
the operand size prefix, not all prefixes). "stosl" is supposed to be
slower than movs on Pentium+, I think.


- Raw text -


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