On Sat, 17 Jun 2006 18:59:57 +0100, Goran Hosinsky wrote: >Using "return" from a sub routine, will a value put into >the "w" register by the subroutine be available to the >main program? Sure. The 'return' instruction goes back to the calling code with whatever is already in W. The 'retlw' goes back with the value specified in the instruction in W. In either case, it's up to you whether or not and how you make use of the value. Regards, Bob -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist