William Chops Westfield wrote: > There is this shorter snipper written by Marv Isaacman: > > MARV: MOVLW 01DH > CLRC > RLF RANDOM > SKPNC > XORWF RANDOM > RETLW 0 > It should be possible to implement a RNG both ways. Essentially, this is running an LFSR backward. A normal LFSR XORs a number of bits and shifts in the result. This takes out a bit and XORs those bits with it. -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/hector.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist