I put a copy of this in the User Example code area

http://www.picbasic.co.uk/forum/content.php?r=71

though it might be better in the DT Book of interrupts micro site

http://dt.picbasic.co.uk/