2021-11-14 22:51:02 +01:00
|
|
|
%import textio
|
2021-10-27 23:48:02 +02:00
|
|
|
|
2021-10-30 15:15:11 +02:00
|
|
|
main {
|
2021-11-06 19:09:33 +01:00
|
|
|
|
2021-11-10 00:17:56 +01:00
|
|
|
sub start() {
|
2021-11-13 12:56:59 +01:00
|
|
|
|
2021-11-21 12:34:57 +01:00
|
|
|
repeat 100 {
|
|
|
|
random_rgb12()
|
|
|
|
txt.print_ubhex(target_red,false)
|
|
|
|
txt.print_ubhex(target_green,false)
|
|
|
|
txt.print_ubhex(target_blue,false)
|
|
|
|
txt.nl()
|
|
|
|
}
|
2021-11-21 00:07:17 +01:00
|
|
|
|
|
|
|
repeat {
|
|
|
|
}
|
2021-11-16 23:52:30 +01:00
|
|
|
}
|
2021-11-21 12:34:57 +01:00
|
|
|
|
|
|
|
ubyte target_red
|
|
|
|
ubyte target_green
|
|
|
|
ubyte target_blue
|
|
|
|
|
|
|
|
sub random_rgb12() {
|
|
|
|
do {
|
|
|
|
uword rr = rndw()
|
|
|
|
target_red = msb(rr) & 15
|
|
|
|
target_green = lsb(rr)
|
|
|
|
target_blue = target_green & 15
|
|
|
|
target_green >>= 4
|
|
|
|
} until target_red+target_green+target_blue >= 12
|
|
|
|
}
|
|
|
|
|
2021-05-13 00:35:22 +02:00
|
|
|
}
|