> org 0x0700 ; Start in really high memory > ;----------------------------------------------------- > ; Convert 4-digit data to 7-segment data > ;----------------------------------------------------- > > Convert7Seg: > movwf SAVE_ADDR ; Save offset > movlw 0x07 > movwf PCLATH > movf SAVE_ADDR,W ; Retrieve offset Saving W around setting PCLATH is pointless because you are about to trash the old W value with the table entry value. I also don't like the MOVLW 7 to get the constant to load into PCLATH. If you change the ORG value, you have to remember to change this value. Worse, you didn't even document this dependecy. A far better answer is to have the assembler load the right value for you automatically. I've added a label to the start of the table for that purpose: movlw high table1 ;set the high bits of the table entry adr movwf pclath > addwf PCL,F ; Jump to appropriate offset table1 ;start address of the table > retlw B'01111110' ; '0' > retlw B'00110000' ; '1' > . > . > . > nop ; Error - '15' > retlw B'00000001' ; Return dash ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics