Re: Conway's Game Of Life
this is my ccitt16 crc code , i feed every byte in the cell array into it and store result in ring buffer after first testing to see if the new crc exists more than once in the buffer buffer, if its there more than once [or twice if you like] thats it game over.
Code:
this is a ccit 16 crc routine
crc var word
crc_in var byte
j var byte
to use set crc to $ffff
then set crc_in to each value to be crc'ed
and gosub crc16
when finished crc hold the crc value
don't forget to reset crc to $ffff for next time
crc16:
crc= crc ^ crc_in
for j=0 TO 7
if (crc&1) THEN
crc= ((crc>>1) ^ $a001 ) ;
else
crc= crc>>1;
ENDIF
NEXT
RETURN
Last edited by richard; - 24th May 2020 at 12:10.
Warning I'm not a teacher
Bookmarks