Scott Dattalo wrote: > > On Sat, 30 Jun 2001, Roman Black wrote: > > > Something like: > > if(x>=31) goto blah > > else if(x==7) goto womble > > Why not: > > incf x,w > xorlw 8 > skpnz > goto womble > andlw 0xe0 > skpz > goto blah > > Of course, this only works well with Mersenne Primes :). Hi Scott, with all due respect for your PIC expertise, you have replaced 2 bulletproof and simple tests with 7 slightly confusing asm instructions. I can happily code my tests in PIC asm, but the simplicity of branching in a "higher" language has something going for it. And I wish I knew what the heck "Mersenne Primes" meant!: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