home *** CD-ROM | disk | FTP | other *** search
- 0 rem--- (c) anssi hakkarainen 1986 ---
- 1 rem veikkausrivit
- 2 rem
- 3 poke251,0:gosub1000
- 4 cc=rnd(-ti)
- 8 dime(3,13),pe(13),q(14)
- 10 poke53280,6:poke53281,6
- 11 print"[147] **** [214]eikkausrivien arvonta ****"
- 12 print:print" ([195]) [193]nssi [200]akkarainen 1986"
- 15 goto230
- 18 rem -- rivien arvonta --
- 20 clr:input"[205]ontako saraketta (max 500)";sa$:ifval(sa$)>500orval(sa$)<1then20
- 25 sa=val(sa$):dimpr$(sa),l$(sa),o(sa),e(3,13),pe(13),q(14)
- 30 print"[211]e maksaa"sa/2"markkaa":m=.99
- 40 fori=1to13
- 50 print"[203][207][200][196][197]"i
- 60 input"[217]kkoselle % ";y$
- 70 input"[210]istille % ";r$
- 80 input"[203]akkoselle % ";k$
- 90 y=val(y$):r=val(r$):k=val(k$)
- 95 ify+r+k<>100thengosub360:goto50
- 100 e(1,i)=y:e(2,i)=r:e(3,i)=k
- 110 print"":next
- 111 print"[207]dota hetki...."
- 120 fori=1tosa
- 125 fort=1to13
- 130 z=rnd(0)+m
- 131 y=e(1,t)/100:r=e(2,t)/100
- 140 ifz<y+1andy>0thenpe(t)=1:goto170
- 150 ifz<y+r+1andr>0thenpe(t)=2:goto170
- 160 pe(t)=3
- 170 pe$=str$(pe(t)):pr$(i)=pr$(i)+pe$:next
- 171 ifi>1thengosub400
- 172 next
- 175 fort=1tosa
- 180 fori=1to26
- 190 ifmid$(pr$(t),i,1)="1"thena$=a$+"1"
- 192 ifmid$(pr$(t),i,1)="2"thena$=a$+"x"
- 194 ifmid$(pr$(t),i,1)="3"thena$=a$+"2"
- 200 next
- 210 l$(t)=a$:a$=""
- 220 next
- 222 gosub300
- 225 print"[147]"
- 230 print:print:print"1 [210]ivien arvonta"
- 235 print"2 [204]ataa rivit"
- 240 print"3 [212]alleta rivit"
- 250 print"4 [212]arkasta rivit"
- 255 print"5 [212]ulosta rivit"
- 260 print"6 [204]opetus"
- 261 getg$:ifg$=""then261
- 265 g=val(g$):p=0
- 270 onggoto20,505,450,600,750,285
- 280 goto261
- 285 end
- 300 rem -- aanimerkki --
- 305 fori=54272to54296:pokei,0:next
- 310 poke54296,15:poke54277,44:poke54278,44:poke54276,33
- 320 poke54273,25:poke54272,177:fori=1to100:next
- 321 poke54273,45:poke54272,198:fori=1to200:next
- 322 poke54273,30:poke54272,141:fori=1to200:next
- 340 fori=54272to54296:pokei,0:next
- 350 return
- 360 forpy=54272to54296:pokepy,0:next
- 365 poke54296,15:poke54277,44:poke54278,166:poke54276,33
- 370 poke54273,5:poke54272,5:forpy=1to100:next
- 380 forpy=54272to54296:pokepy,0:next
- 390 return
- 400 forj=1toi-1:ifpr$(j)=pr$(i)theni=i-1
- 405 next
- 410 return
- 420 rem -- tiedoston talletus --
- 450 input"[212]alletettavan tiedoston nimi";fi$
- 460 open1,8,1,fi$+".vk"
- 465 print#1,sa$
- 470 fori=1tosa
- 480 print#1,l$(i)
- 481 getg$:ifg$="[136]"thenwait631,199
- 490 next
- 495 gosub900:goto791
- 501 rem -- tiedoston lataus --
- 505 clr
- 510 input"[204]adattavan tiedoston nimi";fi$
- 520 open1,8,0,fi$+".vk"
- 530 input#1,sa$
- 535 sa=val(sa$):ifsa=0then552
- 536 diml$(sa),o(sa),q(14)
- 540 fori=1tosa:input#1,l$(i)
- 550 next
- 552 gosub900:goto791
- 590 rem -- rivien tarkastus --
- 600 print"[147] [210]ivien tarkastus"
- 605 ifpeek(251)=1theninput"[212]ulostus myos printterille (k/e) k[157][157][157]";ck$
- 606 ifck$="k"thenp=1
- 610 input"[211]yota oikea rivi";oi$
- 620 iflen(oi$)<>13then610
- 621 print"[207]dota hetki...."
- 622 print
- 630 fort=1tosa
- 631 iflen(l$(t))<>13thenq(0)=q(0)-1
- 635 fori=1to13
- 640 ifmid$(l$(t),i,1)=mid$(oi$,i,1)theno=o+1
- 645 next
- 650 o(t)=o
- 660 o=0:next
- 670 fori=1tosa
- 675 fort=0to13
- 680 ifo(i)=tthenq(t)=q(t)+1
- 690 next:next
- 695 ifp=1thenopen4,4
- 700 fori=13to0step-1
- 705 printi
- 710 print"[145]oikein"q(i)" kpl"
- 711 ifp=1thenprint#4,i" oikein"q(i)" kpl"
- 715 q(i)=0
- 720 next
- 722 ifp=1thenprint#4,chr$(13)chr$(13):close4
- 730 print" paina return "
- 740 getg$:ifg$=chr$(13)then10
- 741 goto740
- 742 rem -- rivien tulostus --
- 750 ifpeek(251)=1theninput"[212]ulostus printterille (k/e) k[157][157][157]";cx$
- 760 ifcx$="k"then800
- 770 fori=1tosa
- 780 printl$(i)" ";
- 781 getg$:ifg$="[136]"thengosub860
- 790 next
- 791 print:print" paina return "
- 792 getg$:ifg$=chr$(13)then10
- 795 goto792
- 800 open4,4
- 810 fori=1tosa
- 820 print#4,l$(i)" ";
- 830 next
- 840 cmd4
- 850 print#4:close4:goto791
- 860 getg$:ifg$="[136]"thenreturn
- 865 goto860
- 895 rem -- levyvirheen tutkiminen --
- 900 close1:open15,8,15:input#15,e1$,e2$,e3$,e4$
- 905 ife2$="ok"thenprint"ok.":goto920
- 910 print""e1$","e2$","e3$;e4$
- 920 close15:return
- 1000 poke53280,6:poke53281,6
- 1010 input"[147][203]aytetaanko printteria (k/e) k[157][157][157]";ka$
- 1020 ifka$="k"thenpoke251,1
- 1030 return
-