home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 59
/
64er_Magazin_Sonderheft_59_19xx_Markt__Technik_de_Side_B.d64
/
op.holz
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
6KB
|
178 lines
1 rem open4,8,15,"s:streichholz":close4
10 rem open1,8,2,"streichholz,p,w
20 [158]36864;[172][172] versi[145] number 4
30 ;.opt o1
40 [172][178] $402
49 ;
50 ; streichholzspiel v[145] nikolaus heusler [173] zwengauerweg 18 [173] 8 muenchen solln
55 ; fragen [171][171][177] rueckp[176][164] !
56 ; a[128]ern der reihen [178] label re in zeile 480
57 ; 64'er s[145]derheft 59[173]1990
58 ; greetings [164] elmar hoerig & peter bertelshofer!
59 ;
60 pattern [178]$c139
70 tbox [178]$c19f
80 mouse[145] [178]$c18a
90 ic[145] [178]$c15a
110 [133] [178]$c1ba
120 r0 [178]2
130 r1 [178]4
140 r2 [178]6
150 r3 [178]8
160 r4 [178]10
170 r5 [178]12
180 r6 [178]14
190 r7 [178]16
200 r8 [178]18
210 r9 [178]20
220 r10 [178]22
230 r11 [178]24
240 keyvec [178]$84a3
250 multiwowo [178]$c166
260 divwowo [178]$c169
270 desk[164]p [178]$c22c
280 menue[145] [178]$c151
290 [184]emenue [178]$c193
300 t[153] [178]$c1ae
310 [148] [178]$c1ed
320 [160] [178]$c277
330 [159] [178]$c274
340 recapp[128] [178]$c289
350 [153] [178]$c148
360 killrec [178]$c283
370 setrec[176]d [178]$c280
380 maxrec [178]$8497
390 page [178]$2f
400 rec [178]$c127
410 trec [178]$c1a2
420 [156]mouse [178]$c19b
430 [156]allmen [178]$c157
440 window [178]$c256
450 rev [178]$8850
460 reset [178]$9185
470 vline [178]$c121
480 re [178]6
490 charout [178]$c145
500 hline [178]$c118
510 [161] [178]$c2a7
1002 fe jsr trec:.byt 34,180:.w[176] 20,256:.byt [171]1
1003 lda #7:jsr pattern:jsr tbox:.byt 47,179:.w[176] 21,255
1004 lda #9:jsr pattern:jsr tbox:.byt 35,46:.w[176] 21,255
1006 jsr t[153]:.w[176] 101:.byt 42:.[198] " streichholzspiel v1 ":brk
1008 lda #1:jsr pattern:jsr tbox:.byt 60,84:.w[176] 60,236
1010 lda #0:jsr pattern:jsr tbox:.byt 52,76:.w[176] 52,228
1011 jsr trec:.byt 52,76:.w[176] 52,228:.byt [171]1
1012 jsr t[153]:.w[176] 64:.byt 69:.[198] "streichholz-ziehen aus
1013 .byt re+48:.asc "[160]reihen":brk
1018 lda #<windtab:ldy #>windtab:sta r0:sty r0+1:jsr window
1020 ldx r0:dex:beq ok
1022 dex:ldy #0
1023 wait dex:bne wait:dey:bne wait
1024 jmp desktop
1025 ok lda #7:jsr pattern:jsr tbox:.byt 47,179:.wor 21,255
1026 lda #<windtab2:ldy #>windtab2:sta r0:sty r0+1:jsr window
1028 lda r0:sec:sbc #4:sta beginner
1034 ok2 lda #0:jsr pattern:jsr tbox:.byt 47,179:.wor 21,255
1036 lda #-1:ldx #0:stx r4+1:ldx #138:stx r4:ldx #48:stx r3:ldx #178
1038 stx r3+1:ldx #$80:stx page:jsr vline:lda #113:sta r11:lda #0:sta r3+1
1039 sta r4+1:lda #254:sta r4:lda #140:sta r3:lda #128:sta page:lda #-1
1040 jsr hline:lda #146:sta r11:lda #-1:jsr hline
1048 ldy #re-1:lda #re
1049 setup sta row,y:sec:sbc #1:dey:bpl setup
1050 jmp main
1100 feldout lda #0:jsr pattern:jsr tbox:.byt 48,179:.wor 21,137
1102 ldy #0
1104 loop1 sty zeile:lda #128:sta page:lda #25:sta r11:lda #0:sta r11+1
1106 lda zeile:sta r1:asl:asl:adc r1:sta r1:lda zeile:asl:asl:asl:asl
1108 adc r1:adc #60:sta r1+1:lda #"":jsr charout:lda zeile:adc #48:jsr charout
1110 lda #34:sta r11:ldy zeile:lda row,y:beq nix
1112 loop2 pha:lda #"i":jsr charout:lda #" ":jsr charout:lda #" ":jsr charout
1114 pla:sec:sbc #1:bne loop2
1116 nix ldy zeile:iny:cpy #re:bcc loop1:lda #"":jmp charout
1190 qcomputer jmp computer
1200 main jsr feldout:lda beginner:beq qcomputer
1201 lda #0:jsr pattern:jsr tbox:.byt 114,145:.wor 139,255
1202 jsr tprint:.wor 140:.byt 122:.asc "welche zeile ? ":brk
1204 get1 jsr get:cmp #"1":bcc get1:cmp #"1"+re:bcs get1:tay:sec:sbc #"1":tax
1206 lda row,x:beq get1:clc:adc #"1":sta anzahl:stx zeile:tya
1208 jsr charout:jsr tprint:.wor 140:.byt 136:.asc "wieviele ? ":brk
1210 get2 jsr get:cmp #"1":bcc get2:cmp anzahl:bcs get2:pha:jsr charout:pla:sec
1212 sbc #"0":sta anzahl
1220 ldx zeile:lda row,x:sec:sbc anzahl:sta row,x:ldx #0:stx r1
1222 count lda r1:clc:adc row,x:sta r1:inx:cpx #re:bcc count
1224 lda r1:beq qcompwin:cmp #1:beq qspiwin
1226 inc beginner:jmp main
1228 qcompwin jmp compwin
1230 qspiwin jmp spiwin
1300 computer lda #0:jsr pattern:jsr tbox:.byt 147,179:.wor 139,255:ldx #re-1
1301 lda #0:sta r1:sta r2:sta a:dec beginner
1302 comp1 lda row,x:tay:beq comp2:clc:adc a:sta a:inc r1:dey:beq comp2:inc r2
1304 comp2 dex:bpl comp1:lda r2:beq comp3:lda r1:lsr:asl:cmp r1:bcc comp4
1306 ldx #re
1308 comp5 stx r4:dex:lda row,x:cmp #2:bcs comp6:txa:bne comp5:beq comp3
1310 comp6 ldx r4:stx zeile:lda row-1,x:sta anzahl:bpl comp9
1312 comp4 ldx #0
1314 comp4a lda row,x:cmp #2:bcs comp7:inx:cpx #re:bcc comp4a:bcs comp3
1316 comp7 ldy row,x:dey:sty anzahl:inx:stx zeile:bpl comp9
1320 comp3 ldx #0
1322 comp3a lda row,x:bne comp8:inx:bne comp3a
1324 comp8 lda #1:sta anzahl:inx:stx zeile
1330 comp9 jsr tprint:.wor 140:.byt 155:.asc "ich nehme ":brk
1332 lda anzahl:ora #"0":jsr charout:ldx anzahl:dex:beq eins
1334 lda #<mehrtxt:ldy #>mehrtxt:bne outtxt
1336 eins lda #<einstxt:ldy #>einstxt
1338 outtxt sta r0:sty r0+1:jsr print
1340 jsr tprint:.wor 140:.byt 169:.asc "aus der ":brk
1342 lda zeile:ora #"0":jsr charout:lda #<zeiltxt:ldy #>zeiltxt
1343 sta r0:sty r0+1:jsr print
1344 ldx zeile:lda row-1,x:sec:sbc anzahl:sta row-1,x:lda a:sec:sbc anzahl
1346 beq spiwin:cmp #1:beq compwin
1348 jmp main
1400 spiwin jsr feldout:jsr tprint:.wor 145:.byt 54:.asc "sehr gut !":brk
1401 inc spsi
1402 jsr tprint:.wor 139:.byt 66:.asc "sie haben gewonnen.":brk:jmp (NULL)n
1500 compwin jsr feldout:jsr tprint:.wor 148:.byt 54:.asc "sorry...":brk
1501 inc cosi
1502 jsr tprint:.wor 139:.byt 66:.asc "ich habe gewonnen.":brk
1510 (NULL)n jsr tprint:.wor 148:.byt 78:.asc "(space taste)":brk
1512 jsr tprint:.wor 150:.byt 90:.asc "spieler: ":brk
1514 lda spsi:jsr numout
1516 jsr tprint:.wor 150:.byt 102:.byt 128:.asc " 64: ":brk
1518 lda cosi:jsr numout
1590 gets jsr get:cmp #" ":bne gets:jmp fe
1600 numout ldx #"0
1602 co100 cmp #100:bcc kl100:inx:sbc #100:jmp co100
1604 kl100 stx zahl:ldx #"0
1606 co10 cmp #10:bcc kl10:inx:sbc #10:bpl co10
1608 kl10 ora #"0":sta zahl+2:stx zahl+1:lda zahl:cmp #"0":bne fini
1610 lda #" ":sta zahl:cpx #"0":bne fini:lda #" ":sta zahl+1
1612 fini lda #"":jsr charout:lda zahl:jsr charout:lda zahl+1:jsr charout
1614 lda zahl+2:jsr charout:lda #"":jmp charout
2000 windtab .byt 1,80,158:.wor 52,228
2002 .byt $b,4,11:.wor text1
2004 .byt $b,4,24:.wor text2
2006 .byt $b,4,37:.wor text3
2007 .byt $b,4,50:.wor text4
2008 .byt 2,16,58,1,1,58
2010 brk
2020 windtab2 .byt 1,80,118:.wor 52,228
2022 .byt $b,4,11:.wor text5
2028 .byt 4,16,18,3,1,18
2029 brk
2100 text1 .asc "sie koennen pro zug aus einer zeile":brk
2102 text2 .asc "beliebig viele hoelzer ziehen, aber":brk
2104 text3 .asc "nicht mehr als in der zeile vor-":brk
2106 text4 .asc "handen sind !":brk
2108 text5 .asc "wollen sie beginnen ?":brk
2110 einstxt .asc " streichholz":brk
2112 mehrtxt .asc " hoelzer":brk
2114 zeiltxt .asc ". zeile":brk
2200 beginner =$a000
2202 row .wor 0,0,0
2204 a brk
2206 zeile brk
2208 anzahl brk
2210 cosi brk
2212 spsi brk
2214 zahl .asc "...