Hi, netQ wrote: > > C=0; > while (A > 103) { > A=A-8; > C=C+1; > } > A=A-96; > FSR=FSR+C; //FSR is PIC's indirect data memory address pointer > bsf INDF,A //This one is in PIC code :) By hand compilation (untested): clrf C ;C=0 loop movlw .103+1 ;while (A>103) { subwf A,w skpc goto XX movlw 8 subwf A,f ; A=A-8 incf C,f ; C=C+1 goto loop ;} XX movlw .96 ;A=A-96 subwf A,f movf C,w ;FSR=FSR+C addwf FSR,f movlw 1 ;BSF INDF,A btfsc A,1 movlw 4 movwf temp btfsc A,0 addwf temp,f btfsc A,2 swapf temp,f movf tmp,w iorwf INDF,f regards, Reggie -- e-mail: rberdin@bigfoot.com ICQ#: 31651436 URL: http://www.bigfoot.com/~rberdin