On Wed, Mar 22, 2000 at 09:51:16AM -0000, Michael Rigby-Jones wrote: > It certainly would make a neat macro if it worked. However, I've just tried > it on V7.85, compiling for a 16F877 with maximum optimisation and it got > it's knickers in a twist: You didn't show your C code, but here's what I tried: ;x.c: 7: count = (CCPR1H << 8) + CCPR1L; movf 22,w ;volatile movwf _count+1 movf 21,w ;volatile movwf _count Looks fine to me. Of course, the other (better) way to do it, which works since CCPR1L and CCPR1H are adjacent and in the right order, is this static unsigned int CCPR1 @ 0x15; Now you can just use it directly. Regards, Clyde PS - Mick, I don't think Clive James reads the PIClist. -- Clyde Smith-Stubbs | HI-TECH Software Email: clyde@htsoft.com | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@htsoft.com | AUS: +61 7 3355 8333 +61 7 3355 8334 --------------------------------------------------------------------------- HI-TECH C: compiling the real world.