Hi. Just a quick check here. In the example as shown in example 5 in AN556 (Table reads), and as copied below, what if the "offset" is h'00' initialy ? Would not the addwf instruction marked (1) give the address of the movwf instruction marked (2) ? And the movwf instruction marked (2) would then just reload the address of itself, creating a loop ? The offest would have to be h'01' (at least) from the beginning, or ? I'd expect a second label right before the first retlw instruction that would be used in the offset calculation in the addwf marked (1). I might be missing something... A second thought... Would it not be better to move the address calculation *inside* the subroutine, so you don't have to dublicate the offset calculation everytime the table is called ? I can't see any problem with this. Jan-Erik. org 0x80 movlw LOW Table ;get low 8 bits of address addwf offset,F ;do an 8-bit add operation (1) movlw HIGH Table ;get high 5 bits of address btfsc status,c ;page crossed? addlw 1 ;yes then increment high address movwf PCLATH ;load high address in latch movf offset,w ;load computed offset in w reg call Table org 0x9FD Table: movwf PCL,F ;load computed offset in PCL (2) retlw 'A' ;return the ASCII char A retlw 'B' ;return the ASCII char B retlw 'C' ;return the ASCII char C -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads