ASM - Stockfish into asm
https://github.com/tthsqe12/asm

readme.txt

1. about another chess engine:
- it is a rewrite of stockfish into asm
- assemble with fasm (www.flatassembler.net)
- all of the nonsense that results from c++ coders wrestling with a compiler is avoided here
- hopefully it gather interest from other asm coders or prospective asm coders
- if ever completed, it should have the same functionality as stockfish
- see 3. for why this possibility has been abnegated in favour of removing piece lists

2. assemble options:
- HAVE (most important) indicates available instructions. program does a runtime check to see if these really are avaiable
- DEBUG turns on some printing and asserts
- DISPLAY_CURRMOVE displays the current move while searching the root

3. about the code so far:
- in a baby state
- if you see popcnt with three operands, don't panic. it just a macro that needs a temp for non-popcnt cpu's
- the thread code from stockfish has been preserved for the most part
- the global variable Threads has been renamed threadPool
- the vector of threads in threadPool have been given static allocation
- the silly function start_routine has been eliminated
- the global variable rootMoves has been given static allocation
- the move generation and picking function have been rewritten
- no piece lists!
- move ordering in movegen is different
- the piece lists are maintain in Pos structure simply by bitboards
- the CheckInfo structure has been merged into the State structure
- the sequence of State structures has been reworked as a simple array instead of a linked list
- this will incur a copy cost at split points when this is written
- but 50 move rule checking is easier
- there are two version of do_move, for setting ci or not
- the search function is not fully written yet
- the qsearch function is fully written :)
- the evaluation function is not written yet
- just piece values and mobility with some pawn stuff
- most changes to stockfish occur in evaluation, so not motivated to write this

4. non-uci commands:
- moves x.. makes the moves x.. from the current pos. if illegal move appears in list, parsing stops there
- undo n:1 undoes n moves
- show displays the current board
- eval displays the output of Evaluate on current position
- perft n usual depth n node count. tests Gen_Legal. with DEBUG = 1, TestPosition is called on each node
- perftp n same as perft but tests Pick structure
- test tests IsMovePseudoLegal, IsMoveLegal, and Gen_Legal. calls TestPosition
- verify verifies that incrementally updated State information is correct. calls VerifyPositionState
- isok makes sure the pos information is legal. calls IsPositionOk

5. register conventions:
- follows MS x64 calling convention for the most part
- uses rdi/rsi for strings were appropriate
- rbp is generally used to hold the Pos structure
- rbx is generally used to hold the current State structure
- rsi is generally used in the search function to hold the Stack or the Pick structures

6. os:
- windows
- uses only window kernel functions for now
- linux port should be easy, as it should involve only a rewrite of Windows.asm and minimal changes to ace.asm