Contributor: MAYNARD PHILBROOK        

 SK> 12345 --------------- Longinteger of the value 12345
 SK> ^^^^^
 SK> |||||
 SK> ||||+----------------- Integer value 5
 SK> ||||
 SK> |||+------------------ Integer value 4
 SK> |||
 SK> ||+------------------- Integer value 3
 SK> ||
 SK> |+-------------------- Integer value 2
 SK> |
 SK> +--------------------- Integer value 1

 SK> I tried using the procedure of geting the MOD of a number then div the
 SK> number out. It works fine until you get a number like
 SK> 10,100,1000,100000, etc....
 SK> Please help...
 not sure what your asking but have you  can use SHR, SHL, OR ect to fetch
 single bits..........
function getbitstate( bitpos:byte; lint:longint):boolean;
   mov @result, 00; { clear bolean first }
   cmp bitpos, 16
   jg  @higher;
   mov bx, lint;
   test bx, bitpos;
   jnz @yes;
   jmp @done;
   mov bx,lint+2;
   jmp @yup;
   inc @result, 1;          { adjust bolean return }

_____ to use it ____

 if getbitstate(8, $80) then Write(' Yup, it's on ');