Hej Tony Nixon. Tack fšr ditt meddelande 01:08 991124 enligt nedan: >Morgan Olsson wrote: > > > > In the thread "A-D on PIC 16C73B" , table boundary problem was mentioned. > > >If a value in ram is specified for a 256 element lookup table then this >may help deal with boundary issues. There are probably better methods >around also. > > > movlw high ($ + 8) > movwf pclath > movf RAMx,w > addlw low ($ + 6) > btfsc Status,Carry > incf pclath > movf RAMx,w > addwf pcl > retlw 0h > retlw 1h > etc... Looking good There is a similar solution in AN556d , example 5, where calculations are done before calling/gotoing the table. Wold make a nice macro. Problem i the many extra cycles; a table itself is very fast. If we first make a macro of the compile time check, to put at end of table, we then will get a message if we need to implement your or solution above (or ex 5 in AN556d). Could be easy and clear to implement as a macro. /Morgan