// Thank you Brad and Congrats! I love my Digirule2 :-) // Here is an attempt to generate a pseudo rand value between 1 and 6 ( so you can use your digirule2 as a dice!: Who doesn't need one??). // First, press any button to choose a seed. then generate with the last button on the left side. // This is 'kind of' working, but I am sure other backers can improve it or suggest another algorithm (longer period, more even probability)!!? //For now: // Rand-Dice6_for_digirule2-ver01 by Amaury // // statusRegister 252 // buttonRegister 253 // addressLEDRegister 254 // dataLEDRegister 255 speed 70 sbr 2 252 copylr 1 254 nop nop nop nop nop // Choose seed. press any bit :LoopInit shiftrl 254 Call ChooseSeed bcrss 7 254 jump LoopInit :ShiftRightLoop shiftrr 254 Call ChooseSeed bcrss 0 254 jump ShiftRightLoop jump LoopInit nop nop nop nop nop nop nop nop nop nop :ChooseSeed //note: Works better when choosing b00000010 as seed Copyra 253 Addla 0 bcrsc 0 252 return Nop copyar 250 Copyrr 250 255 nop nop nop nop nop nop copylr 128 254 copyla 0 :LoopWait bcrsc 7 253 call Rand copyar 255 //copyrr 250 254 nop nop nop jump LoopWait nop :Rand // Generate pseudo Rand (8x+1)mod 255 shiftrl 250 shiftrl 250 shiftrl 250 //shiftrl 250 nop nop incr 250 copyra 250 Nop Nop Nop Nop // Divide by 42 copylr 0 249 :Divide incr 249 subla 42 Nop Nop Nop bcrss 1 252 Jump Divide // Display 1 to 6 with data led Cbr 1 252 shiftrl 249 Nop Nop addrpc 249 Retla 8 // one Retla 24 // two Retla 28 // three Retla 54 // four Retla 55 // five Retla 119// six