<< Previous | Next >>

BIT

unsigned int BIT( void * address, unsigned int bit );

Description

Dynamic C may expand this call inline.

Reads specified bit at memory address. bit may be from 0 to 31. This is equivalent to the following expression, but more efficient:

   

(*(long *)address>>bit) &1

Parameters

address
Address of byte containing bits 7-0

bit
Bit location where 0 represents the least significant bit

Return value

1: bit is set
0: bit is clear

Library

UTIL.LIB

See also

bit


Dynamic C Functions << Previous | Next >> rabbit.com