Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void iopm_fillRange(BYTE pIopm[IOPM_SIZE], PORTRANGE* pRange) {
- int i=pRange->first, iAmount=(pRange->last-i)+1;
- DWORD *pdwIopm = (DWORD*)pIopm;
- #define __FillRange__(_OP,_V) \
- DWORD dwMask = (((i|31)+1)-i)>iAmount?((DWORD)-1)>>((((i|31)+1)-i)-iAmount):-1; \
- if (i&31) { pdwIopm[i>>5] _OP ((-1<<(i&31))&dwMask); iAmount -= 32-(i&1) ; i = (i|31)+1; } \
- for ( i>>=5 ; iAmount>31 ; iAmount-=32 ) pdwIopm[i++] = _V; \
- if (iAmount>0) pdwIopm[i] _OP (((DWORD)-1)>>(32-iAmount));
- if (!pRange->isEnabled) { __FillRange__(|=,-1); } else { __FillRange__(&=~,0); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement