This is one method... clrf Offset GData movlw High(DList) movwf PCLATH movlw Low(DList) addwf Offset,W btfsc STATUS,C incf PCLATH call DList ; do whatever with data in W incf LoopCount movlw High(GData) ; restore PCLATH movwf PCLATH goto GData org 0xWhatEver DList addwf PCL retlw 0x00 retlw 0x01 "A.J. Tufgar" wrote: > > Hello all, > I've got a device that has a bunch of different beep codes. > What I'd like to do is store the different codes in a look-up table. > > So far I've created a routine that does such (motified version of > microchips table routines), but I'm having problems going to a specfic > line number in my program. > > What I want to do is this: (NOTE: is is not my actual code, just to show > what I'm having problems with) > > movlw 0x000 > movwf table_lowbyte > > movlw 0x003 > movwf table_highbyte > > movwf PCLATH > movf table_lowbyte, w > call table_highbyte + table_lowbyte <-- This is my problem how do I > tell the pic to call the address stored in the two variables? > > org 0x300 > movwf PCL > retlw > retlw > ... > > Thanks to all, > Aaron > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads