8-Bit Software Online Conversion
Lottery Checker - Listing
10MODE 7
20PROCinit
30PROCscreen
40PROCinfo
50PROCinput
60PROCsearch
70PROCscore(p%)
80PROCpause(2)
90PROCendprog
100END
110:
120DEF PROCscreen
130PRINTTAB(0,2)banner$
140PRINTTAB(11,5)" by"
150PRINTTAB(5,7)" Ray Thomas (D9U)"
160PRINTTAB(5,10)" A Programme to"
170PRINTTAB(4,11)" check a syndicate's
"
180PRINTTAB(5,12)" lottery numbers"
190PRINTTAB(0,17)CHR$(148);STRING$(39,
"|")
200FOR l%=18 TO 20
210PRINTTAB(0,l%)CHR$(132);CHR$(157)
220NEXT
230FOR l%=4TO16
240PRINTTAB(27,l%)CHR$(132);CHR$(157)
250PRINTTAB(0,l%)CHR$(135);CHR$(157)
260NEXT
270REM..........
280PROClott
290PROCpause(2)
300PROCotte
310PROCdownL(30,18):PROCpause(1)
320PROCsideL(27,18):PROCpause(1)
330PROCupL(24,18):PROCpause(1)
340PROCsideL(21,18):PROCpause(1)
350PROCdownL(18,18):PROCpause(1)
360PROCsideL(15,18):PROCpause(1)
370PROCupL(12,18):PROCpause(1)
380PROCsideL(10,18):PROCpause(1)
390PROCdownL(8,18):PROCpause(1)
400PROCsideL(6,18):PROCpause(1)
410PROCupL(2,18):PROCpause(1)
420REM.................
430PROCtter
440PROCsideO(30,18):PROCpause(1)
450PROCupO(27,18):PROCpause(1)
460PROCsideO(24,18):PROCpause(1)
470PROCupO(21,18):PROCpause(1)
480PROCsideO(18,18):PROCpause(1)
490PROCupO(15,18):PROCpause(1)
500PROCsideO(12,18):PROCpause(1)
510PROCupO(10,18):PROCpause(1)
520PROCupO(7,18):PROCpause(1)
530REM.............
540PROCtery
550PROCdownT(30,18):PROCpause(1)
560PROCsideT(27,18):PROCpause(1)
570PROCupT(24,18):PROCpause(1)
580PROCsideT(21,18):PROCpause(1)
590PROCdownT(18,18):PROCpause(1)
600PROCsideT(15,18):PROCpause(1)
610PROCupT(12,18):PROCpause(1)
620REM...............
630PROCery
640PROCdownT(30,18):PROCpause(1)
650PROCsideT(27,18):PROCpause(1)
660PROCupT(24,18):PROCpause(1)
670PROCsideT(21,18):PROCpause(1)
680PROCupT(17,18):PROCpause(1)
690REM.............
700PROCry
710PROCdownE(30,18):PROCpause(1)
720PROCry
730REMPROCry
740PROCsideE(26,18):PROCpause(1)
750PROCupE(22,18):PROCpause(1)
760REM.........
770PROCy
780PROCdownR(30,18):PROCpause(2)
790PROCsideR(28,18):PROCpause(2)
800PROCupR(27,18):PROCpause(2)
810REM.............
820PROClast
830PROCupY(33,18):PROCpause(2)
840PROCdownY(33,18):PROCpause(2)
850PROCupY(32,18):PROCpause(2)
860PROCroysbit
870PROCspace
880ENDPROC
890:
900DEF PROCinfo:CLS
910PRINTTAB(0,2)banner$
920PRINTTAB(3,5)"The names and numbers
are held in"'" DATA statements starting
at line 3610."
930PRINTTAB(1,8)"To use the program fo
r your syndicate"'" you will of course h
ave to enter your"'" own names and selec
tions."''" Enter the total number of ent
ries in"'" line 3590."
940PRINTTAB(1,15)"To check your score
enter the winning"'" numbers as indicate
d and after a short pause the name(s) an
d score(s) (if any"'" will be displayed.
"
950PROCspace:CLS
960ENDPROC
970:
980DEF PROCspace
990PRINTTAB(0,22)CHR$(132);CHR$(157)"
TO CONTINUE PLEASE PRESS SPACE"
1000*FX15,0
1010REPEAT UNTIL GET=32
1020ENDPROC
1030:
1040DEF PROCupL(x,y)
1050PRINTTAB(x,y) "
1060PRINTTAB(x,y+1)"
1070PRINTTAB(x,y+2)"
1080ENDPROC
1090:
1100DEF PROCpause(p%)
1110TIME=0:REPEAT:UNTIL TIME=(p%)*10
1120ENDPROC
1130:
1140DEF PROCsideL(x,y)
1150PRINTTAB(x,y) "
1160PRINTTAB(x,y+1)"
1170PRINTTAB(x,y+2)"
1180ENDPROC
1190:
1200DEF PROCdownL(x,y)
1210PRINTTAB(x,y) "
1220PRINTTAB(x,y+1)"
1230PRINTTAB(x,y+2)"
1240ENDPROC
1250:
1260DEF PROCupO(x,y)
1270PRINTTAB(x,y) "
1280PRINTTAB(x,y+1)"
1290PRINTTAB(x,y+2)"
1300ENDPROC
1310:
1320DEF PROCsideO(x,y)
1330PRINTTAB(x,y) "
1340PRINTTAB(x,y+1)"
1350PRINTTAB(x,y+2)"
1360ENDPROC
1370:
1380DEF PROCupT(x,y)
1390PRINTTAB(x,y) "
1400PRINTTAB(x,y+1)"
1410PRINTTAB(x,y+2)"
1420ENDPROC
1430:
1440DEF PROCdownT(x,y)
1450PRINTTAB(x,y) "
1460PRINTTAB(x,y+1)"
1470PRINTTAB(x,y+2)"
1480ENDPROC
1490:
1500DEF PROCsideT(x,y)
1510PRINTTAB(x,y) "
1520PRINTTAB(x,y+1)"
1530PRINTTAB(x,y+2)"
1540ENDPROC
1550:
1560DEF PROCupE(x,y)
1570PRINTTAB(x,y) "
1580PRINTTAB(x,y+1)"
1590PRINTTAB(x,y+2)"
1600ENDPROC
1610:
1620DEF PROCsideE(x,y)
1630PRINTTAB(x,y) "
1640PRINTTAB(x,y+1)"
1650PRINTTAB(x,y+2)"
1660ENDPROC
1670:
1680DEF PROCdownE(x,y)
1690PRINTTAB(x,y) "
1700PRINTTAB(x,y+1)"
1710PRINTTAB(x,y+2)"
1720ENDPROC
1730:
1740DEF PROCupR(x,y)
1750PRINTTAB(x,y) "
1760PRINTTAB(x,y+1)"
1770PRINTTAB(x,y+2)"
1780ENDPROC
1790:
1800DEF PROCsideR(x,y)
1810PRINTTAB(x,y) "
1820PRINTTAB(x,y+1)"
1830PRINTTAB(x,y+2)"
1840ENDPROC
1850:
1860DEF PROCdownR(x,y)
1870PRINTTAB(x,y) "
1880PRINTTAB(x,y+1)"
1890PRINTTAB(x,y+2)"
1900ENDPROC
1910:
1920DEF PROCupY(x,y)
1930PRINTTAB(x,y) "
1940PRINTTAB(x,y+1)"
1950PRINTTAB(x,y+2)"
1960ENDPROC
1970:
1980DEF PROCsideY(x,y)
1990PRINTTAB(x,y) "
2000PRINTTAB(x,y+1)"
2010PRINTTAB(x,y+2)"
2020ENDPROC
2030:
2040DEF PROCdownY(x,y)
2050PRINTTAB(x,y) "
2060PRINTTAB(x,y+1)"
2070PRINTTAB(x,y+2)"
2080ENDPROC
2090:
2100DEFPROClott
2110PROCdownL(31,14)
2120PROCsideO(31,11)
2130PROCdownT(31,8)
2140PROCsideT(31,5)
2150ENDPROC
2160:
2170DEF PROCotte
2180PROCupO(31,14)
2190PROCdownT(31,11)
2200PROCupT(31,8)
2210PROCsideE(31,5)
2220ENDPROC
2230:
2240DEF PROCtter
2250PROCsideT(31,14)
2260PROCupT(31,11)
2270PROCdownE(31,8)
2280PROCsideR(31,5)
2290ENDPROC
2300:
2310DEF PROCtery
2320PROCdownT(31,14)
2330PROCsideE(31,11)
2340PROCdownR(31,8)
2350PROCsideY(31,5)
2360ENDPROC
2370:
2380DEF PROCery
2390PROCdownE(31,14)
2400PROCsideR(31,11)
2410PROCdownY(31,8)
2420PROCblank(31,5)
2430ENDPROC
2440:
2450DEF PROCry
2460PROCdownR(31,14)
2470PROCsideY(31,11)
2480PROCblank(31,8)
2490REMPROCblank(30,5)
2500ENDPROC
2510:
2520DEF PROCy
2530PROCdownY(31,14)
2540PROCblank(31,11)
2550REMPROCblank(31,8)
2560REMPROCblank(31,5)
2570ENDPROC
2580:
2590DEF PROClast
2600PROCblank(31,14)
2610ENDPROC
2620:
2630DEF PROCblank(x,y)
2640PRINTTAB(x,y)STRING$(5," ")
2650PRINTTAB(x,y+1)STRING$(5," ")
2660PRINTTAB(x,y+2)STRING$(5," ")
2670ENDPROC
2680:
2690DEF PROCroysbit
2700PRINTTAB(30,5)" Title "
2710PRINTTAB(30,6)" Screen"
2720PRINTTAB(30,7)" by"
2730PRINTTAB(30,8)" Roy "
2740PRINTTAB(29,9)" Dickens"
2750PRINTTAB(30,10)" (20G)"
2760ENDPROC
2770:
2780DEF PROCinit:@%=8
2790banner$=CHR$(132)+CHR$(157)+"
LOTTERY CHECKER"
2800*FX11
2810*FX4,1
2820READ N%:VDU23,1,0;0;0;0;
2830DIM res$(7),n$(7),ptr%(20),sum%(6),
num$(N%),name$(N%),n%(99)
2840FOR I%=1 TO 7:READ n$(I%):NEXT
2850FOR I%=1 TO N%
2860READ name$(I%),num$(I%)
2870NEXT
2880ENDPROC
2890:
2900DEF PROCinput
2910PRINTTAB(0,1)banner$
2920FOR I%=1 TO 7
2930REPEAT valid=TRUE
2940res$=FNgpi(4,10," Enter "+n$(I%)+"
winning no: ",48,57,2)
2950IF VAL(res$)<1 OR VAL(res$)>49 OR n
%(VAL(res$)) valid=0:VDU7
2960UNTIL valid:n%(VAL(res$))=TRUE
2970IF LEN(res$)=1 res$="0"+res$
2980res$(I%)=res$
2990PRINTTAB(1,2)CHR$(131)"You have"
3000PRINTTAB(1,3)CHR$(131)"entered numb
er..."
3010PRINTTAB(I%+20,I%+2)CHR$(131)"..."r
es$
3020NEXT:CLS
3030ENDPROC
3040:
3050DEF PROCsearch:VDU23,1,1;0;0;0;
3060PRINTTAB(0,2)banner$
3070PRINTTAB(11,9)" Searching...."TAB(1
1,14)" Please wait ";:p%=0
3080FOR I%=1 TO N%:sum%=0
3090FOR J%=1 TO 6
3100IF INSTR(num$(I%),res$(J%)) sum%=su
m%+1
3110NEXT
3120IF sum%>2 p%=p%+1:ptr%(p%)=I%:sum%(
p%)=sum%
3130NEXT:VDU23,1,0;0;0;0;12
3140ENDPROC
3150:
3160DEF PROCheading(n%)
3170PRINTTAB(7,11-n%/2)" Name"TAB(24,11
-n%/2)" Score"
3180ENDPROC
3190:
3200DEF PROCscore(n%)
3210PRINTTAB(0,2)banner$
3220FOR I%=1 TO n%:bonus=0
3230IF sum%(I%)=5 PROCcheck(ptr%(I%),re
s$(7))
3240IF n%>0 PROCprint(bonus,sum%(I%),pt
r%(I%),I%,n%) ELSE PRINTTAB(9,10)"Sorry,
there are no"TAB(7,12)"winning lines th
is week!"
3250NEXT
3260ENDPROC
3270:
3280DEF PROCcheck(I%,r$)
3290IF INSTR(num$(I%),r$) bonus=TRUE
3300ENDPROC
3310:
3320DEF PROCprint(b,s%,c%,v%,n%)
3330LOCAL y%:y%=12-n%/2+v%
3340PROCheading(n%)
3350IF b PRINTTAB(6,y%)name$(ptr%(v%))T
AB(19,y%)5"+B" ELSE PRINTTAB(6,y%)name$(
ptr%(v%))TAB(20,y%)s%
3360ENDPROC
3370:
3380DEF PROCendprog
3390PRINTTAB(0,22)CHR$(132)+CHR$(157)+C
HR$(135)" Press <SPACE> to end ";
3400REPEAT UNTIL GET=32:CLS
3410VDU23,1,1;0;0;0;12
3420*FX12
3430*FX4,0
3440ENDPROC
3450:
3460DEF FNgpi(x%,y%,prmt$,l%,h%,len%)
3470LOCAL key%,a$
3480PRINTTAB(x%+LEN(prmt$),y%)STRING$(l
en%,".")TAB(x%,y%)prmt$;
3490REPEAT
3500VDU23,1,1;0;0;0;
3510*FX15,1
3520key%=GET
3530VDU23,1,0;0;0;0;
3540IF key%>=l% AND key%<=h% AND LENa$<
len% a$=a$+CHR$key%:VDU key% ELSE IF a$=
"" OR LEN(a$) AND key%<>13 AND key%<>127
VDU7
3550IF key%=127 AND LEN(a$) VDU8,46,8:a
$=LEFT$(a$,LEN(a$)-1)
3560UNTIL key%=13 AND LEN(a$)
3570=a$
3580:
3590DATA 96
3600DATA 1st,2nd,3rd,4th,5th,6th,Bonus
3610DATA "Allen.L", "05,08,09,12,2
7,30"
3620DATA "Bassett.R", "03,07,09,22,2
7,40"
3630DATA "Bayes.J", "08,15,17,29,4
1,44"
3640DATA "Berrington.V", "02,09,26,36,4
6,47"
3650DATA "Bradman.J", "02,08,28,29,4
0,49"
3660DATA "Braithwaite.E","02,05,13,18,3
0,44"
3670DATA "Briggs.Q", "06,10,13,23,2
6,42"
3680DATA "Brownlee.C", "02,13,21,25,3
3,40"
3690DATA "Bruce.R", "07,09,13,22,3
1,45"
3700DATA "Burkart.D", "09,14,25,31,4
3,44"
3710DATA "Butler.S", "03,13,16,23,2
5,31"
3720DATA "Cann.E", "06,14,16,24,3
3,44"
3730DATA "Chennell.A", "03,06,11,13,2
0,41"
3740DATA "Clarke.D", "03,09,11,37,4
2,45"
3750DATA "Clavey.C", "13,17,22,26,3
4,42"
3760DATA "Cluff.J.M", "05,11,22,34,4
1,43"
3770DATA "Coles.J", "09,17,21,33,3
7,42"
3780DATA "Cummings.G", "08,19,33,36,3
9,44"
3790DATA "Dawson.P", "08,16,22,29,3
3,38"
3800DATA "Dillon.D", "06,14,20,34,4
1,48"
3810DATA "Dixon.B", "02,12,19,20,2
2,48"
3820DATA "Dobson.A", "03,16,18,27,3
5,49"
3830DATA "Dopazo.A", "07,10,13,31,3
7,45"
3840DATA "Draine.M", "04,17,28,39,4
0,46"
3850DATA "Drew.B", "02,14,19,33,3
7,41"
3860DATA "Forshaw.K", "12,32,35,41,4
3,47"
3870DATA "Frost.R", "07,10,17,26,2
9,31"
3880DATA "Gayton.M", "04,14,16,34,3
7,41"
3890DATA "Goff.E", "03,07,27,30,3
5,41"
3900DATA "Goodes.I", "03,09,10,33,4
5,47"
3910DATA "Goodliffe.P", "09,10,22,25,3
2,48"
3920DATA "Goodwin.J", "06,10,23,26,3
4,40"
3930DATA "Greaves.T", "03,12,14,24,3
8,41"
3940DATA "Greenhalf.A", "11,15,18,27,4
1,43"
3950DATA "Grout.D", "12,18,22,30,3
2,35"
3960DATA "Hale.G", "05,06,09,10,3
0,33"
3970DATA "Harry.A", "06,11,14,24,3
4,43"
3980DATA "Hathaway.E", "05,06,16,19,2
0,38"
3990DATA "Hawks.M", "04,06,11,22,2
8,37"
4000DATA "Hinchon.L", "07,09,15,16,4
5,47"
4010DATA "Hoban.M", "03,11,12,25,3
2,46"
4020DATA "Holloway.J.D", "04,07,08,11,2
6,27"
4030DATA "Holly.V", "03,13,26,27,3
7,38"
4040DATA "Holyoak.P", "01,06,25,36,4
2,44"
4050DATA "Howitt.C", "05,15,18,42,4
6,48"
4060DATA "Humphreys.J", "02,12,16,23,2
6,32"
4070DATA "Ince.R", "14,20,26,27,2
9,44"
4080DATA "Jarrold.B", "10,13,19,34,4
7,49"
4090DATA "Jones.S", "04,06,12,32,4
1,49"
4100DATA "Kennard.P", "07,11,13,36,4
2,45"
4110DATA "Kibble.B", "07,13,18,23,2
9,37"
4120DATA "Levett.T", "03,04,17,28,3
9,47"
4130DATA "Limmage.S", "02,12,27,35,3
7,44"
4140DATA "Lloyd.H", "11,19,21,22,3
7,44"
4150DATA "Mansbridge.D", "04,17,26,27,2
9,36"
4160DATA "Marchant.H", "05,07,23,32,4
4,48"
4170DATA "Mascoll.W", "01,07,22,23,2
7,31"
4180DATA "Mehew.C", "04,16,22,28,3
8,44"
4190DATA "Mitchell.J", "01,07,13,16,1
8,26"
4200DATA "Mistry.V", "04,16,25,26,3
1,43"
4210DATA "Moore.A", "05,09,12,28,4
5,48"
4220DATA "More.M", "08,14,27,37,4
2,44"
4230DATA "Nixon.M", "06,13,14,17,2
2,26"
4240DATA "Noble.K", "03,08,14,19,2
7,31"
4250DATA "Norman.P", "06,17,22,29,3
1,45"
4260DATA "Overton.D", "02,07,15,26,2
8,30"
4270DATA "Patel.D", "07,11,19,21,4
2,46"
4280DATA "Patel.P", "05,10,11,16,2
8,45"
4290DATA "Prowse.P", "19,25,27,33,3
5,47"
4300DATA "Queeley.C", "03,13,23,39,4
1,45"
4310DATA "Rainbow.S", "04,25,33,37,4
0,45"
4320DATA "Redman.D", "10,16,18,27,3
6,37"
4330DATA "Robinson.D", "05,21,28,35,4
4,48"
4340DATA "Stewart.G", "08,19,23,37,4
2,48"
4350DATA "Roxburgh.A", "06,09,17,18,3
2,49"
4360DATA "Rugman.M", "02,03,05,17,3
0,47"
4370DATA "Rzepka.M", "01,08,14,17,2
4,47"
4380DATA "Sacco.E", "05,11,18,38,
44,45"
4390DATA "Saunders.K", "04,08,16,19,3
4,47"
4400DATA "Saunders.V", "03,10,24,31,3
4,37"
4410DATA "Seber.M", "04,12,13,15,4
3,44"
4420DATA "Spaughton.M", "17,24,27,34,4
2,49"
4430DATA "Spinks.R", "02,31,33,34,3
9,43"
4440DATA "Spowart.A", "11,14,36,41,4
8,49"
4450DATA "Stone.R", "04,07,18,33,4
4,46"
4460DATA "Thoday.R", "08,18,28,41,4
4,45"
4470DATA "Thomas.R", "06,17,23,27,3
2,49"
4480DATA "Thornes.G", "07,15,17,27,3
3,42"
4490DATA "Tipler.C", "07,26,34,42,4
4,45"
4500DATA "Waller.G", "02,26,30,31,4
0,48"
4510DATA "Walley.D", "06,10,16,25,3
1,39"
4520DATA "Ward.R", "06,13,17,27,4
2,46"
4530DATA "Wilmott.D", "08,17,33,37,4
2,44"
4540DATA "Woods.P", "03,13,23,32,3
5,42"
4550DATA "Wright.B", "04,06,19,34,3
8,46"
4560DATA "Holly.S", "05,10,11,27,3
7,43"