Génération alphabet SIXTEM aléatoire
Programme aléatoire 8 séries. Les valeurs soulignées sont entre crochets [xx]
5 rem Programme Multiplex 8 dim index, alea, primes 10 let index=0, alea=0 11 dim prime8 12 dim Dig1, Dig2, Aff1, Aff2 as byte 13 data 3,5,7,11,13,17,19,23 14 for index=0 to 7 15 read primeindex 16 next 20 dim panpar as byte at address 0x4010006a 21 dim ddran as byte at address 0x40100022 22 dim portan as byte at address 0x4010000a 23 let panpar = 0x00 24 let ddran = 0xff 220 dim a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z 230 data 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 235 data 20,21,22,23,24,25 240 read a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z 250 dim Symb130, Symb230 as byte 260 let Symb1a = 0x58, Symb2a = 0x10 270 let Symb1b = 0x06, Symb2b = 0x4c 280 let Symb1c = 0x58, Symb2c = 0x00 290 let Symb1d = 0x58, Symb2d = 0x30 300 let Symb1e = 0x40, Symb2e = 0x58 310 let Symb1f = 0x1c, Symb2f = 0x23 320 let Symb1g = 0x23, Symb2g = 0x4c 330 let Symb1h = 0x43, Symb2h = 0x54 340 let Symb1i = 0x02, Symb2i = 0x1c 350 let Symb1j = 0x1c, Symb2j = 0x30 360 let Symb1k = 0x06, Symb2k = 0x58 370 let Symb1l = 0x06, Symb2l = 0x1c 380 let Symb1m = 0x54, Symb2m = 0x54 390 let Symb1n = 0x54, Symb2n = 0x00 400 let Symb1o = 0x23, Symb2o = 0x1c 410 let Symb1p = 0x06, Symb2p = 0x23 420 let Symb1q = 0x23, Symb2q =0x06 430 let Symb1r = 0x54, Symb2r = 0x08 440 let Symb1s = 0x61, Symb2s =0x4c 450 let Symb1t = 0x01, Symb2t = 0x30 460 let Symb1u = 0x1c, Symb2u = 0x10 470 let Symb1v = 0x1c, Symb2v = 0x00 480 let Symb1w = 0x1c, Symb2w =0x1c 490 let Symb1x = 0x4c, Symb2x = 0x58 500 let Symb1y = 0x62, Symb2y = 0x4c 510 let Symb1z = 0x43, Symb2z = 0x4c 520 let Symb126 = 0x58, Symb226 = 0x10 530 let Symb127 = 0x40, Symb227 = 0x58 540 let Symb128 = 0x02, Symb228 = 0x1c 800 dim scl as pin scl for digital output 810 dim sda as pin sda for digital output 820 configure timer 0 for 10 ms 925 on timer 0 do gosub interrupt 830 let Dig1 = 0x00 840 let Dig2 = 0x00 850 let Aff1= 1 900 rem main 910 while 1 do 911 for prime=0 to 7 920 for index = 0 to 25 922 let alea = (primeprimes+alea) % 29 926 next 930 let Dig1 = Symb1alea 940 let Dig2 = Symb2alea 950 sleep 2s 955 on timer 0 do gosub interrupt 960 next 980 endwhile
1000 sub interrupt 1070 if Aff1==1 then 1080 let Aff1= 0 1090 gosub affiVert 1100 else 1110 let Aff2= 0 1111 gosub affiRouge 1115 endif 1116 endsub 1120 gosub ledR
1140 sub affiRouge 1150 let sda=0 1160 let Aff1= 1 1170 let portan=Dig1 1180 let scl = 1 1190 endsub
1210 sub affiVert 1220 let scl=0 1230 let Aff2= 1 1240 let portan=Dig2 1250 let sda=1 1290 endsub