Gerard Mantoux wrote: > > Hi, > I'am following PIC list for a while now, and after some small projects > with > 16C84, I want to build a 9 digits frequency counter (say beyond 100 > MHz). > something that looks like Peter Alicky's counter, but with an external > prescaler. > Does any of you have very efficient routines for 4 bytes 32 bits) add > and > substract for 16C84? I mean efficient in term of size and/or speed > MTIA > Gerard Mantoux email: gerard.mantoux@bull.net > [OPINIONS ARE MY OWN & DO NOT NECESSARILY REFLECT BULL POLICIES] My TEA encryption routines have a 32 bit math macro file that does exactly what you need (I hope at least :-). They have 32bit add, subtract and move with literal and/or register operands. You can find them on my site at http://members.tripod.com/~mdileo/ following the link to CryptoPIC inside a file called TEA13.ZIP. HTH Ciao Marco