On Fri, 21 Dec 2001, Don Hyde wrote: > indexlsb equ 0x80 > indexmsb equ 0x81 ;table index is here > temp equ 0x82 > > lookup: > movlw low table > addwf indexlsb,w > movwf temp > movfw indexmsb > skpnc > incf indexmsb,w > addlw high table > movwf PCLATH > movfw temp > movwf FSR > > table retlw 1 > retlw 2 > ... Why not save a couple instructions: movlw HIGH(table) addwf indexmsb,w movwf PCLATH movlw LOW(table) addwf indexlsb,w skpnc incf PCLATH,F movwf PCL But the table probably is accessed sequentially: incf PCLATH,F incfsz index,w decf PCLATH,F movwf index movwf PCL But even better IMO, is to use the 16F877 or similar flash device and store the table directly in ROM. One word holds 14-bits, 9 words hold 16 bytes. Also, since this is a bit stream, you really don't have to worry about artificial byte boundaries. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body