On Sat, 8 Apr 2006, David VanHorn wrote: > On 4/8/06, Robert Ammerman wrote: >> >> Generating a random permuttion of the values from 0..N-1 is particularly >> easy. > > Right, but doing it in the assembler at assemble time, or doing it in the > chip at run time, isn't that simple. At assembly time you don't do it in assembler. Perl etc. At run time if you have a source of random numbers you can filter-fill a vector. E.g. zero the vector then for each random number run through the vector until you find a non-zero location and put the number in it. If you find the number in a location before finding a zero discard the number, and start over with another random number. This gets prograssively slower (obviously) but that may be good. In fact it it fills fast, then you know you are using a PRNG ;-) Peter -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist