Use: movlw tabstart movwf FSR movlw value1 movwf INDF incf FSR,F movlw value2 movwf INDF incf FSR,F . . . to load a table into RAM, then access it with FSR. or: decf count,f skpnz retlw value1 decf count,f skpnz retlw value2 ... Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "Roman Black" To: Sent: Wednesday, May 30, 2001 1:09 PM Subject: Re: [PIC]: A table question. > Olin Lathrop wrote: > > > > > Hi, has anyone done a table-less data table?? > > > > > > I have run out of room on a 12-core PIC and > > > need a small table. > > > > > > I have tried: > > > > > > movlw 23 (table data byte) > > > decf count,f > > > skpnz > > > goto table_exit > > > movlw 71 (next data byte) > > > decf count,f > > > skpnz > > > goto table_exit > > > > > > But this is 4 bytes per table data byte. > > > Does anyone have a more efficient system? > > > > How many table entries are there? Unless the table is very small, a normal > > table will be more compact than what you did above. Are you totally out of > > room or just room in the first 256 locations? > > > Hi Olin, yes I have no room in any table-able > area. This is a 12-core device and I have room > left in the non-table-able areas. :o) > > Hence the need to make a table using some other > system. I only need about 20 entries, and can do > it with 80 words as shown above, but would prefer > 60 words. Surely someone has already done this? > -Roman > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body