>Scott Dattalo and Andy Warren have seen this but I thought it may >be not only of interest of the list but maybe someone has a better >way. (Andy - note added parentheses) > > > > ;Subtract two byte literal. > ;At exit, C = 0 if result is negative > >sub_word_literal: macro aaa, lll > > movlw low (~(lll) + 1) > addwf aaa+1, f > movlw high ((~(lll) + 1) & h'ffff') > skpnc > addlw 1 > skpnc > skpz > addwf aaa, f > endm > >-- >Bob Fehrenbach Wauwatosa, WI bfehrenb@execpc.com Hi Bob, I haven't got a better version, but a typo has crept into the above code the high and low bytes of the address are flipped. ie aaa should be aaa+1 and vice versa. This macro raise two points 1. make the assembler/compiler do some of the work 2. make the piclist do the debugging. :-) Ray Gardiner, Shepparton, Victoria, Australia, ray@netspace.net.au