On Jun 17, 2006, at 11:31 AM, Wouter van Ooijen wrote: >> Using "return" from a sub routine, will a value put into >> the "w" register by the subroutine be available to the >> main program? > > on >=14-bit cores: yes > on 12-bit cores: no > 14+ bit cores have both a "return" instruction that does not modify the W register and the retlw instruction that loads a constant into W. The 12 bit cores have ONLY the retlw instruction, so any value explicitly loaded into W will be overwritten by the retlw instruction that does the return. BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist