Sorry, John. This wouldn't go. if count starts out with any value other than 1 it will return 'value1'. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "O'Reilly John E NORC" To: Sent: Wednesday, May 30, 2001 2:20 PM Subject: Re: [PIC]: A table question. > Would this work? > > comf count,F > incfsz count,F > retlw value1 > incfsz count,F > retlw value2 > incfsz count,F > retlw value3 > incfsz count,F > retlw value4 > incfsz count,F > retlw value5 > etc. > > > John > > -----Original Message----- > From: Bob Ammerman [mailto:RAMMERMAN@PRODIGY.NET] > Sent: Wednesday, May 30, 2001 11:08 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: A table question. > > > I knew it, I knew it... > > There _is_ a two instruction per entry technique! > > movlw value1^value2^value3 > decfsz count,F > xorlw value1 > decfsz count,F > xorlw value2 > decfsz count,F > xorlw value3 > etc. > > Notice what happens: > > If count == 1 on entry then all the xor's except value1 occur, > leaving 'value1' in W. > > If count == 2 on entry then all the xor's except value2 occur, > leaving 'value2' in W. > > If count == 3 on entry then all the xor's except value3 occur, > leaving 'value3' in W. > > 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:13 PM > Subject: Re: [PIC]: A table question. > > > > Bob Ammerman wrote: > > > > > > And why can't you use a normal ADDWF PCL,F table? > > > > > > Wow! Everyone on the piclist is deaf tonight! ;o) > > > > It is a 12-core PIC, you can only put calls and > > computed gotos on the bottom 256byte blocks. Those > > are all full of other tables. I need a sane way > > of adding a small table in another area (a high > > block where tables are not possible). I can do it > > with the 4:1 system I showed but that is very > > unpolished. Surely someone has done this before? > > :o) > > -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 > > -- > 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