Author: Dan Newman
Date: 12:19:31 01/14/02
Go up one level in this thread
On January 13, 2002 at 16:32:01, David Rasmussen wrote: >On January 13, 2002 at 13:20:52, Dan Newman wrote: > >>On January 13, 2002 at 08:48:13, David Rasmussen wrote: >> >> >>I do something like this (Dann Corbit's trick): >> >> bsf eax dword ptr bitboard+4 >> add eax 32 >> bsf eax dword ptr bitboard >> > >I get it now... Is there a similar trick for a "LastBit()" function? > >/David I think something like this should work: bsr eax dword ptr bitboard sub eax 32 bsr eax dword ptr bitboard+4 add eax 32 which makes using last-bit a bit more expensive, but it's still straight line code... -Dan.
This page took 0.01 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.