Hi Scott. Nice approach and realization. ;) Some debugging... > ; > ; Multiply x*y and produce a 16bit result. The high byte of the > ;result is aliased with x. > ; > > multiply > movf x,w ;; or save a cycle by letting the caller init. ;) > > clrc > clrf res_lo > > btfsc y,0 > goto l0 > > btfsc y,1 > goto l1 > > btfsc y,2 > goto l2 > > btfsc y,3 > goto l3 > > btfsc y,4 > goto l4 > > btfsc y,5 > goto l5 > > btfsc y,6 > goto l6 > > btfsc y,7 > goto l7 > clrf x ;otherwise y==0 but x isn't > goto l8 ;; or return > > l0 rrf x,f > rrf res_lo,f > > btfsc y,1 > addwf x,w > > l1 rrf x,f > rrf res_lo,f > > btfsc y,2 > addwf x,w > > l2 rrf x,f > rrf res_lo,f > > btfsc y,3 > addwf x,w > > l3 rrf x,f > rrf res_lo,f > > btfsc y,4 > addwf x,w > > l4 rrf x,f > rrf res_lo,f > > btfsc y,5 > addwf x,w > > l5 rrf x,f > rrf res_lo,f > > btfsc y,6 > addwf x,w > > l6 rrf x,f > rrf res_lo,f > > btfsc y,7 > addwf x,w > > l7 rrf x,f > rrf res_lo,f > > l8 return