In message <199704031857.MAA17617@dfw-ix12.ix.netcom.com> PICLIST@MITVMA.MIT.EDU writes: > Mayes uk wrote: > > > > I'm in need of a sanity check - chasing a bug and can't pin > > it down. Should this macro work: > > > > ; adds 16 bit value @ aaa to 32 bit value @ bbb > > AddIntToLong macro aaa, bbb > > > > movf aaa+1, w ; least significant bytes > > addwf bbb+3, f > > > > [etc....] > > Mike: > > The macro looks ok to me (as long as you're expecting it to add > UNSIGNED numbers together), but you really should enclose every > occurrence of "aaa" and "bbb" in parentheses, e.g.: > > AddIntToLong macro aaa,bbb > > movf (aaa)+1,w > addwf (bbb)+3,f > > etc. > Andy, Thanks for the reply. That macro wasn't actually the error, but it not handling signed number would have caught me out at some time. I've changed it to propogate the carry properly now. Regards, Mike