On Thursday 12 June 2003 23:16, Sergio Masci scribbled: > > Possibility 1.... > > > > Case: > > movf HIGH FunctionPointers,W > > movwf PCLATH > > movf SOME_VAR,W > > addwf PCL,F > > FunctionPointers: > > goto Option1Actions > > goto Option2Actions > > try it this way instead > > Case: > movlw HIGH FunctionPointers Oops... yes, that should've been "movlw". > movwf PCLATH > movf SOME_VAR,W > addlw LOW FunctionPointers > btfsc STATUS,C > incf PCLATH > movwf PCL > > FunctionPointers: > goto Option1Actions > goto Option2Actions Ahhh.... you're computing instead. That's good. > Your function pointer table may also need to look like this: > > FunctionPointers: > movlw high Option1Actions > movwf PCLATH > goto Option1Actions > nop > > movlw high Option2Actions > movwf PCLATH > goto Option2Actions > nop > > movlw high Option3Actions > movwf PCLATH > goto Option3Actions > nop Hopefully won't. I'm doing this on a 16F628 (2k), and hoping that I can=20 squeeze it into a 16F627 (1k), so page boundaries mean nothing to me! In this case as well, I'd need to multiply SOME_VAR by 4 before adding it= to=20 the future PC value. Must try this tomorrow. Cheers, -Neil. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.