Checking whether a specific bit (0-31) is set

Returns True if bit number Pos is set in Value or False if it is cleared.

function IsBit(Value, Pos: Integer): Boolean;
asm
  mov ecx, eax
  xor eax, eax
  and edx, 31
  bt  ecx, edx
  adc eax, 0
end;

Source: www.guidogybels.net.