Author: Matthias Gemuh
Date: 10:38:02 05/18/02
Hi Experts,
I want to speed up my chess engine and need assembler versions of these
functions. These below seem to be pentium-specific. I need something general
and don't understand assembler.
int FirstBit(BITBOARD a)
{
__asm {
bsr edx, dword ptr a+4
mov eax, 31
jnz l6
bsr edx, dword ptr a
mov eax, 63
jnz l6
mov edx, -1
l6: sub eax, edx
}
}
int LastBit(BITBOARD a)
{
__asm {
bsf edx, dword ptr a
mov eax, 63
jnz l7
bsf edx, dword ptr a+4
mov eax, 31
jnz l7
mov edx, -33
l7: sub eax, edx
}
}
Please, help me.
Thanks,
Matthias.
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.