Ill try that code now. I was using asm because i wasnt sure if the C code takes to long to process and i would mistakenly skip a pulse and get the wrong data.
I'm not a fan of C, but any mechanical process (like a key press) is an incredibly slow process - even a BASIC Stamp (running interpreted BASIC from an EEPROM) would be plenty fast enough.
C is generally very fast anyway, and depending on optimisation (and how you write it) may be little different in speed to assembler - but it will create the worst looking assembler code 'you ever did see' (you're probably far too young, and on the wrong continent, to understand that 'spotty dog' reference ).