@dannyf
Thank you for the links to your blog and Kuhn's description. I have been unhappy with my software debouncer and wrote a small program for that approach (simulates, but not thoroughly tested). I only use Assembly, and the code requires one register and a couple of rotates. This is for a switch (PORTC,0) that is low when open and waits for a low before returning from the ISR.
EDIT: Couldn't get the code to format, so added as image attachment.
EDIT2: Was worried about a step and in fact, it is a bug with a more complex simulation.
Disregard code, it doesn't work. If fixed, I will repost.
EDIT3: Fixed that bug. There may be others. Updated image attachment. Changed rlf debounce,w to rlf debounce,f and added step.
I realize this may be of interest to only 13 people in the world. But when you are retired, that doesn't matter.
John
Edit: That code looks horrible, but looked fine in the "preview." What is the preview for if it doesn't work? Tried pasting from MPLAB, as I usually do and skipped preview. That wasn't much better. Attached image. Sorry for inconvenience.