> 1.Why doesn't this work? I'm sure it does work exactly as you wrote it. If that isn't what you intended, then I can't say because you never said what you wanted it to do. ***** COMMENT YOUR CODE, *&#$&@ ! ***** > list p=16f876 > include "P16f876.inc" > ;............................... > tmp equ 0x21 > ;............................... > org 0x00 > goto start > ;............................... > start > movlw 0x1 > movwf tmp > nop > if tmp = = 1 Note that this is always false since TMP = 21h. > call sub1 > else > call sub2 > endif > nop Note that this will fall thru to SUB1, which will do a RETURN and cause a stack underflow. > ;............................... > sub1 > nop > return > ;.............................. > sub2 > nop > return > end ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.