i am programming a smart card and i was wondering if i could halt my codes until a card is detected present at the smart card reader without using a loop. using a loop until a card is detected can do the job but it eats a lot of the CPU usage. i would like to execute my codes until a change in status is detected, ie. a smart card is detected. sleep can't help either. can someone help me on this problem?