rcgldr
Homework Helper
- 8,946
- 687
Based on some comments in some old threads at other forums, I think this is similar to what gcc probably does. It takes 4.4 seconds on my system (note it's 1/2 the number of iterations I used for my popcnt test).uart said:X86 parity flag implementation.
Code:
mov ecx,07blackfh
xor edx,edx ;set edx = parity
par0: mov eax,ecx
xor al,ah
jpe par1
not edx
par1: shr eax,16
xor al,ah
jpe par2
not edx
par2: loop par0
neg edx