In the contest! :) movwf reg0 ;reg0=3w/8 bcf status,c rrf reg0,f addwf reg0,f rrf reg0,f bcf status,c rrf reg0,f movf reg0,w movwf reg1,f ;iteratively refine twice bcf status,c ;w/3=3w/8-(2(w'/3))/16 rlf reg1,f swapf reg1,w andlw 0x0f subwf reg0,w movwf reg1,f bcf status,c rlf reg1,f swapf reg1,w andlw 0x0f subwf reg0,w Enter with a byte in w, exit with the byte divided by 3 in w. 20 words program, 20 cycles, 2 register bytes. If you want to save 3 words make the iteration a subroutine, this will cost you 8 cycles in execution time. Anyone came up with a better code? (I quit this subject...) ;) -- Lauri --- For more info.