Charles, I do just exactly that. In my interrupt routine. I copy th state of my button and add it to a shifted result. When the button is connected to ground with a pullup to VDD, the value after the 8 cycle (interrupt) debounce is equal to zero. When the button is released the value after the 8 cycle (interrupt) debounce is equal to 255. I use a 10 millisecond interrupt timer so the debounce time is 80 milliseconds. That way all the main has to do is interrogate debounce variable for it's value.

Dave Purola,
N8NTA