Bob Ammerman wrote: > > Yes: xorlw method is a bit smaller. > > Yes: this method requires at least one word in low half of page. > > But: this method is significantly faster. > > So: horses for courses. Yep it's a bit quicker, but a lot messier. The XORLW system you posted is as neat as a normal table, and can have more units added to it at any point or subtracted from it. Also with a larger table size it would get significantly smaller (and be MUCH neater). All in all I thought your XORLW system was totally brilliant, only takes 2 words per table byte and is very neat and simple. Unless speed is the main issue I think it would be horse chosen for my course. ;o) -Roman > > > Bob Ammerman wrote: > > > > > > > > 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. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics