Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A nice programming riddle!

Author: Dann Corbit

Date: 17:04:04 07/03/02

Go up one level in this thread


On July 03, 2002 at 18:00:20, Dan Andersson wrote:

>I believe that depends on wher the data is stored. Registers, fine. Memory... :(

XCHG    Exchange register/memory with register

     operands   bytes   8088    186     286     386     486     Pentium
     reg, reg    2       4       4       3       3       3       3   NP
     reg, mem  2+d(0-2)  25+EA  17       5       5       5       3   NP
     mem, reg  2+d(0-2)  25+EA  17       5       5       5       3   NP

     acc, reg    1       3       3       3       3       3       2   NP
     reg, acc    1       3       3       3       3       3       2   NP

     in above: acc = AX or EAX only


        Example:        xchg    ax, dx

   NP = not pairable

Of course, there must be a {large} read cost to fetch the item from memory if it
is not in the cache.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.