Author: Larry Griffiths
Date: 06:43:03 01/25/01
Go up one level in this thread
On January 25, 2001 at 08:10:37, Uri Blass wrote:
>>#define gBlackBishopQueenCaps(fs) \
>>{ \
>> __asm mov eax,board\
>> __asm movq mm0,[eax].A1H8board\
>> __asm mov ebx,fs\
>> __asm shl ebx,2\
>> __asm movd mm1,[A1H8shift+ebx]\
>> __asm psrlq mm0,mm1\
>> __asm pand mm0,[A1H8rotMask+ebx]\
>> __asm movd mm2,[A8H1shift+ebx]\
>> __asm movq mm3,[eax].A8H1board\
>> __asm psrlq mm3,mm2\
>> __asm pand mm3,[A8H1rotMask+ebx]\
>> __asm shl ebx,9\
>> __asm movd ecx,mm0\
>> __asm shl ecx,3\
>> __asm movq mm4,[attacksA1H8+ebx+ecx]\
>> __asm movd ecx,mm3\
>> __asm shl ecx,3\
>> __asm movq mm5,[attacksA8H1+ebx+ecx]\
>> __asm por mm4,mm5\
>> __asm pand mm4,whitePieces\
>> __asm movq toMap,mm4\
>>}
>
>I would like to understand these short procedures.
>Unfortunately I know nothing about assembler.
>
>Can you explain what is the meaning of mov,shl,movq and other commands or give a
>link that explains only the meaning of these commands?
>
>Uri
Robert Hyatt has written an excellent article about bitboard move generation. I
was already doing file and rank bitboards, but his article helped me understand
diagonal bitboards. I suggest you get this article if you do not already have
it.
My bitboards are in a "Rank" format except for FOUR occupied bitboards. These
Occupied bitboards are organized so that contiguous bits representing Ranks,
Files, or diagonals can be extracted and used as an index to bitboard arrays
that are in Rank format. My bitboard arrays will return bits ON for adjacent
empty squares up to and including occupied squares in Rank format. The bits are
then extracted to produce "Captures/Moves" with From,To squares etc.
Using bitboards Allows for faster evaluation without scanning the board looking
for pieces and empty squares. This in my opinion is where the slowness of
bitboard move generation/make/unmake is offset.
Larry.
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.