/* bfs bfr in C
*
* header file
*
* Michal 'GiM' Spadlinski http://gim.org.pl/ gim@@at@@skrzynka@@dot@@pl
*/
#ifndef __BSFR_H
#define __BSFR_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* returns first set bit of input using BSF
* instruction from 386 assembler instruction set
* or -1 of input equals 0
*/
int
bsf (
unsigned long int
input);
/* returns last set bit of input using BSR
* instruction from 386 assembler instruction set
* or -1 if input equals 0
*/
int
bsr (
unsigned long int
input);
#ifdef __cplusplus
}
#endif
#endif
This document should validate, please check by clicking: