flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Hash value for words. |
Author |
|
Roman 29 Oct 2024, 10:45
|
|||
29 Oct 2024, 10:45 |
|
Roman 31 Oct 2024, 12:19
https://board.flatassembler.net/topic.php?t=10010
Code: macro embed_crc start,finish { local b,c c = 0xffffffff repeat finish-start load b byte from start+%-1 c = c xor b repeat 8 c = (c shr 1) xor (0xedb88320 * (c and 1)) end repeat end repeat dd c xor 0xffffffff } start is inclusive and finish is exclusive. Use like this Code: MyCode: mov eax,0x12345678 xor eax,edx ret embed_crc $$,$ |
|||
31 Oct 2024, 12:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.