Konference: ATARI a 8 mi bitové počítače
Od: | Atari8 |
Datum: | 23.7.2011 15:09 |
Předmět: | Re: Logik, kde hádá i počítač |
> Zdravím Taurus.
>
> Ps: jestli bude čas a nálada tak to zkusím přepsat do Atari_emulátoru na
PC
> a pak to opět dám na www.ulozto.cz
> ---
Pokud se s tim nekdo chcete prepisovat, tak sem to prohnal OCRkem...
Vysledek sem vubec nezkoumal, ale treba to pomuze..
V.
VYPIŠ PROGRAMU
0 REM LOGIK ATARI - 9.6.1986
1 REM PROGRAM NAPISAL:
2 REM
3 REM ING. DUŠAN LACIKA
4 REM INTERNATNA 32
5 REM 97401 BANSKA BYSTRICA
6 REM
10 ? .POKE 752,1:POKE 710,194:P0SITI0 N 5/9:? "MOMENT PROSÍM..." 20
POSITION 5,11:7 "NACITAVAM STROJOVÉ P ROGRAMY":GOTO 60 30 X=0
40 READ A:IF A=-l THEN RETURN 50 POKE PAR+X/A:X=X+1:GOTO 40 60
PAR=10261:GOSUB 30 70 PAR=1039OiGOSUB 30 80 PAR=10440:GOSUB 30 90
PAR-10496:GOSUB 30 100 PAR=10752:GOSUB 30
110 ?"*":P0KE 82,0:? :? "LOGICKÁ HRA HA DANIA CISLIC " 115 ?"
120 ?"TV0J SUPER BUDE ATARI 800XL" 130 ? :? :? "ULOHOU JE UHÁDNUT
STVORCIFE RNU KOMBINA-":? "CIU POCITACA SKOR AKO T 0 UROBÍ ON."
140 ? :? "KAZDY POSTUPNÉ VOLI STVOŘICU C ISEL KDE":? "SA NESMIE OPAKOVAT
TA ISTA CISLICA."
150 ? "SUPER JE POVINNY ODPOVEDAŤ DVOMA CISLI-":? "CAMI - PRVA UDAVA
POČET UHADN UTYCH CIS"
160 ? "LIC A DRUHA POČET CISLIC NA SPRAV NOM ":? "MIESTE. VYHRÁVÁ TEN
KTO SKOR UH ADNE SU-"
170 ? "PERCVU KOMBINÁCIU. V POSLEDNOM ST LPCI ":? "JE ZOBRAZENY POČET
MOŽNÝCH KOM BINACII "
172 ? "POCITACA.":? :? "HRA ZAČNE STLACE
NIM NIEKTOREJ KLÁVESY."
180 POKE 764,255
190 IF PEEK (764) =255 THEN 190
200 S1=0:S2=0:P0KE 752,0:POKE 764,255:CH YB=0
201 DIM MEDZK(40 >,AK(1)
35
202 MEDZ>:= " " = MEDZw (40) =MEDZw = MEDZw (2) =M EDZw
210 X=USR(10261):LOG=0
220 POC-PEEK (10240) +256*F'EEK (10241)
230 ?
240 ? " TY ATARI "iSÍi
":"iS2
250 ? " ****************************"
:POSITION 28,3:? POC:RD=3:PC=0
251 ><= I NT ( RND (0) *5040)
253 FOR POM=0 TO 3=POKE 10253+POM,PEEK<1 5360+4*X+P0M) : NEXT POM
260 POSITION 2,19:? "CAKAM TVOJE ClSLA "
;:TRAP 330:INPUT A
270 IF A>9999 OR A<0 THEN 330
280 F'1=INT(A/1000) : A=A-P1*1000
290 P2=INT(A/100):A=A-P2*100
3O0 F'3= I NT (A /1 0) :P4=A-P3*10
310 X=USR (10390, F'4, F'3, F'2 ,P1)
320 IF F*EEK< 10244 )=0 THEN 340
330 ? "CHYBNÁ KOMBINACIA CISLIC - PIS ZN
OVIJ" : GOTO 260
340 PC=PC+1:RD=RD+1:POSITION 2,19:? MEDZ
X:? MEDZW
350 X=USR(10440)
360 POS ITI ON 0, RD : ? PC; " . " ;F"1; P2; P3; P4 ;"
";PEEK(1025?);PEEK<10258) 362 IF PEEK(10257)=4 AND PEEK<10258)=4 T HEN 800
364 IF LOG=l THEN 500
370 X=INT(RND(O)*5039)
380 IF PEEK<15360+4*X)<10 THEN 410
390 IF X=5039 THEN X=0:GOTO 380
400 X=X+1:GOTO 380
410 POSITION 15,RD:FOR POM=0 TO 3:? PEEK (15360+4*X+F'0M) ; : POKE
10245+F'OM, PEEK (153 60+4*X+P0M):NEXT POM
420 POSITION 2,19:? "AKO SOM NA TOM ";:T
TRAP 420.INPUT A.IF A>44 THEN 420
430 D1=INT(A/10):D2=A-D1*10
440 POSITION 2,19:? MEDZw
450 POSITION 20,RD:? Dl,D2:IF Dl=4 AND D
2=4 THEN 700
460 X=USR(10496,Dl,D2)
470 RD=RD+'l: POSITION 28,RD:? PEEK(10240)
+256*PEEK<19241)
489 IF PEEK<1O240)+256*PEEK<10241)<=50 T HEN L0G=1
485 IF PEEK(10240)+256*PEEK(10241)=0 THE N 600
490 GOTO 260 500 X=USR<10752)
510 VYB=PEEK(10257)+256*PEEK(10258) 520 POSITION 15,RD:F0R P0M=0 TO 3:?
PEEK (VYB+POM);:POKE 10245+P0M,PEEK(VYD+POM)= NEXT POM.GOTO 420
600 POSITION 2,19:IF CHYB=0 THEN CHYB=1: ? "KLAMEŠ - DAVAM TI ESTE
-JEDNU SANCU !" :GOTO 210
610 ? "NIE SI PARTNER PRE MNA - NEVÍES P RE-":? " HRAVAT. KONCIM HRU
!!!":FOR X= 1 TO 10O0:NEXT X 620 ? "*":END
700 S2=S2+1:POSITION 2,19:? "VYHRÁL SOM
- MOJE CISLO BOLO ";:FOR X=0 TO 3=? PEEK (10253+X);:NEXT X = ? ,
710 ? " DALSIU HRU (A/N)"í:GOTO 810 800 S1=S1+1:POSITION 2,19:?
"GRATULUJEM VYHRÁL SI !!!":? " DALSIU HRU <A/N)"; 810 TRAP 40000:INPUT
Ax:IF A*="A" THEN 2 10
820 END
999 REM POCIATOCNE GENEROVÁNIE VSETKYCH STVOŘÍC - OD ADRESY 10261
1000 DATA 104,169,0,170,157,0,40,232,224
,21,208,248,169,60,141,3,40,162,3,138,23 3,1,168,189,5,40,217,5
1010 DATA 40,240,68,192,0,240,4,136,76,4
7,40,202,208,233,162,O,173,2,40,141,81,4
0,173,3,40,141,82,40
1020 DATA 189,5,40,157,O,0,232,224,4,208
,245,238,0,40,208,8,169,0,141,0,40,238,1 ,40,173,2,40,24,105
1030 DATA 4,141,2,40,144,8,169,0,141,2,4
0,238,3,40,162,3,254,5,40,169,10,221,5,4
0,240,3,76,38,40,169,0
1040 DATA 157,5,40,202,16,235,96,-1
1049 REM KONTROLA PŘÍPUSTNOSTI ZADANE.J S
TVOŘÍCE - OD ADRESY 10390
1050 DATA 104,162,3,1 04,1 04,157,9,40, 202
,16,248,169,0,141,4,40,162,3,138,233,1,1
68,189,9,40,217,9,40
1060 DATA 240,12,192,0,240,4,136,76,175, 40,202,208,233,96,238,4,40,96,
1 1069 REM VYHODNOTENIE TYPU SUPERA - OD A DRESY 10440
1070 DATA 104,169,0,141,17,40,141,18,40,
162,0,160,0,189,9,40,217,13,40,298,14,23 8,17,40,142,19,40
1080 DATA 204,19,40,208,3,238,18,40,200,
192,4,208,232,232,224,4,208,222,96, 1 1089 REM VYHODNOTENIE TYPOVANÍA
POCITACA
- OD ADRESY 10496
1090 DATA 104,104,104,141,17,40,104,104,
141,18,40,169,0,141,0,40,141,1,40,141,9, 40,169,60,141,10,40
1100 DATA 169,0,141,19,40,141,20,40,173, 9,40,141,52,41,173, 10, 40,
141,53,41, 162, 0 ,160,0,189,0,0,201
1110 DATA 10,240,78,217,5,40,208,14,238,
19,40,142,4,40,204,4,40,208,3,238,20,40, 200,192,4,208,232,232
1120 DATA 224,4,208,218,173,17,40,205,19
,40,208,24,173,18,40,205,20,40,208,16,23 8,0,40,208,8,169,0
1130 DATA 141,0,40,238,1,40,76,136,41,17
3,9,40,141,134,41,173,10,40,141,135,41,1 69,10,141,0,O,173,9
1140 DATA 40,24,105,4,141,9,40,144,8,169
,O,141,9/40,238,10/4O/l73,9/40,205,2,40, 208,9,173,10,40,205 1150 DATA
3,40,208,1,96,76,27,41,-1 1159 REM VOLBA CISLA POCITACA PRE POSLED NYCH
50 MOŽNOSTI - OD ADRESY 10752 1160 DATA 104,169,0,141,9,40,141,10,40,1
41,5,40,141,7,40,141,4,40,169,60, 141,6,4 0,169,140,141,8,40
1170 DATA 173,5,40,141,47,42,141,68,42,1
73,6,40,141,48,42,141,69,42,173,0,0,201, 10,240,52,173,7,40
1180 DATA 141,71,42,173,8,40,141,72,42,1 62 ,0.,
189,0,0,157,0,0,232,224,4,208,245,2 38,9,40,208,8,169,0
1190 DATA 141,9,40,238,10,40,173,7,40,24
,105,7,141,7,40,144,3,238,8,40,173,5,40, 24,105,4,141,5,40,144
1200 DATA 3,238,6,40,173,5,40,205,2,40,2
OS,157,173,6,40,205,3,40,208,149,169,0,1 41,11,40,141,17,40,169
1210 DATA 140,141,12,40,141,18,40,169,0,
141,19,40,141,20,4ň,173,11,40,141,188,42 ,173,12,40,141,189,42
1220 DATA 173,17,40,141,191,42,173y18,40
,141,19.2,42,162,0,160,0,189,0,0,217,0,0, 208,.14,238,19,40,142
1230 DATA 4,40,264,4,40,298,3,238,20,40,
200,192,4,208,232,232,224,4,208,222,173, 17,40,141,243,42,141
1240 DATA 250,42,173,18,40,141,244,42,14 1,251,42,162,4,173,19, 40,
157,0, 0, 232, 173 ,20,40,157,0,0,173,17
1250 DATA 40,24,105,7,141,17,40,144,3,23
8,18,40,173,17,40,205,7,40,240,3,76,151, 42,173,18,40,205,8,40
1260 DATA 249,3,76,151,42,169,9,141,4,49
,141,19,49,169,0,141,20,40,169,0,141,17, 49,169,149,141,18,49,173,19
1279 DATA 40,295,29,49,48,96,162,4,160,5
,169,0,141,5,40,173,17,40,141,91,43,141, 99,43,173,18,49,141,92
1289 DATA 43,141,199,43,189,9,9,295,19,4
9,298,11,185,9,9,295,29,49,298,3,238,5,4 9,173,17,49,24,195,7
1299 DATA 141,17,4Q,144,3,238,18,40,173,
17,49,295,7,49,249,3,76,72,43,173,18,49, 295,S,49,249,3,76,72,43
1300 DATA 173,4,40,295,5,49,16,6,173,5,4
9,141,4,49,238,29,49,173,29,49,291,5,298 ,132,238,19,49,173,19
1319 DATA 49,291,5,240,3,76,40,43,162,6,
173,11,49,141,299,43,173,12,49,141,201,4 3,173,4,40,157,O,O,173
1320 DATA 11,40,24,105,7,141,11,40,144,3
,238,12,40,169,O,141,17,40,169,149,141,1 8,49,173,11,49,295,7
1330 DATA 40,240,3,76,151,42,173,12,40,2
95,8,49,249,3,76,151,42,169,9,141,11,49, 141,17,49,169,149,141
1349 DATA 12,49,141,18,40, 162,6,189,0, 14 9 , 141,4 ,49,173, 11-,
49,141,29,44,173,12,49 ,141,39,44,189,9,9,295
1359 DATA 4,49,16,15,141,4,49,173,11,49,
141,17,49,173,12,49,141,18,49,173,11,49, 24,195,7,141,11,49,144
1360 DATA 3,238,12,49,173,11,49,295,7,49 ,
298,199,173,12,40,205,8,40,298,191,96,-1