Ray Gardiner wrote: >>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 >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. Well, it depends. I usually store high byte - low byte in successive registers, in which case the macro works. For example: cblock tempH tempL endc sub_word_literal tempH, 1234 The first part of the macro subtracts (adds compliment) of the lsb and the second part subtracts the msb. >This macro raise two points > 1. make the assembler/compiler do some of the work > 2. make the piclist do the debugging. :-) Amen to both. -- Bob Fehrenbach Wauwatosa, WI bfehrenb@execpc.com