home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 1 #3 / utv1n3s1.d64 / digger (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  5KB  |  147 lines

  1. 0 rem  *******************************
  2. 10 rem ** digger copyright (c) 1987 **
  3. 20 rem **   by richard caravella    **
  4. 30 rem **    105 phyllis drive      **
  5. 40 rem **  lindenhurst ny  11757    **
  6. 50 rem *******************************
  7. 60 rem **          041187           **
  8. 70 clr:poke53280,0:poke53281,0:poke783,0
  9. 75 print"[147]"chr$(8)chr$(142):a=rnd(-ti/79):gosub690
  10. 80 poke 52,48: poke 56,48: clr
  11. 90 for i=49152 to 49196: read a: poke i,a: next
  12. 100 sys 49152: rem xfer char rom
  13. 105 for i=49152 to 49188: read a: poke i,a: next: rem install seq reader
  14. 110 reada:ifa=-1then130
  15. 120 fori=0to7:readb:poke12288+a*8+i,b:next:goto110
  16. 130 poke53272,(peek(53272)and240)or12:gosub730
  17. 140 q=54272:w=54296:qw=54273:we=54276:g=54277:kk=54278:forj=qtow:next:pokew,15
  18. 150 pokeg,64:pokekk,48
  19. 160 poke53280,12:poke53281,0:s$="[152]+":s=hs
  20. 170 a=1024:b=55296:d$="[145][154]^ ":a$="[158][166][166][166][166][166][166][166][166][166][166]":m$="@"
  21. 180 c$="[152][166]                                      [166]":rd=0:l=1:s=5:d=4:e$="[152]++++"
  22. 190 ifd<1then830
  23. 200 ifrd=3thenl=l+1:rd=0
  24. 210 ifl=10andrd=0thend=d+1
  25. 220 rd=rd+1:ll=l:ifll>=10thenll=10
  26. 230 fori=1tol:pokeqw,50+l:pokeq,100:pokewe,33:forz=1to20:next:pokewe,0:next
  27. 240 x=20:y=12:print"[147]":fori=1to18:print"[152][166]";:next:print"[155]____[152]";:fori=1to18
  28. 250 print"[152][166]";:next:fori=1to20:printc$;:next:fori=1to18:print"[152][166]";:next
  29. 260 print"[155]____[152]";:fori=1to17:print"[152][166]";:next:pokea+999,102:pokeb+999,12
  30. 270 fori=1to10:y1=int(rnd(1)*19)+4:x1=int(rnd(1)*33)+2
  31. 280 poke782,x1:poke781,y1:sys65520:printe$:next
  32. 290 fori=1to25:y1=int(rnd(1)*19)+4:x1=int(rnd(1)*36)+2:p=int(rnd(1)*3)+35
  33. 300 poke646,(rnd(1)*15):poke782,x1:poke781,y1:sys65520:printchr$(p):next
  34. 310 fori=1toll*2:y1=int(rnd(1)*19)+4:x1=int(rnd(1)*23)+2
  35. 320 poke782,x1:poke781,y1:sys65520:printa$:next
  36. 330 gosub480:print"[145][155]     level"l"     round"rd;"   ";:fori=1tod:printd$;:next
  37. 340 get k$: if k$=chr$(140) then 1200
  38. 345 j%=peek(56320)and31:xx=x:yy=y:x=x+sgn(j%and4)-sgn(j%and8)
  39. 350 y=y+sgn(j%and1)-sgn(j%and2)
  40. 380 if(j%and16)=.thengoto560
  41. 390 ifpeek(a+x+40*y)=102thenx=xx:y=yy:goto460
  42. 400 ifpeek(a+x+40*y)=32thens=s-5
  43. 410 ifpeek(a+x+40*y)=35thens=s+10*l
  44. 420 ifpeek(a+x+40*y)=36thens=s+15*l
  45. 430 ifpeek(a+x+40*y)=37thens=s+20*l
  46. 440 ifpeek(a+x+40*y)=31then190
  47. 450 ifrnd(1)*1>.5andr>=1then520
  48. 460 pokea+xx+40*yy,43:pokea+x+40*y,30:pokeb+x+40*y,12
  49. 470 print""spc(45)"[155]score:"s;"[157]  ":goto340
  50. 480 r=int(rnd(1)*4)+1
  51. 490 fori=1tor:m(i,1)=int(rnd(1)*19)+4:m(i,2)=int(rnd(1)*36)+2
  52. 500 pokeqw,40:pokeq,200:pokewe,33:forz=1to20:next:pokewe,0
  53. 510 poke782,m(i,2):poke781,m(i,1):sys65520:printm$:next:return
  54. 520 fori=1tor:x1=m(i,2):y1=m(i,1):poke782,x1:poke781,y1:sys65520:prints$;
  55. 530 y1=y1+sgn(y-y1):x1=x1+sgn(x-x1):poke782,x1:poke781,y1:sys65520:printm$;
  56. 540 ifx=x1andy=y1thend=d-1:goto190
  57. 550 m(i,1)=y1:m(i,2)=x1:next:goto460
  58. 560 h=x:v=y
  59. 570 h=h+sgn(j%and4)-sgn(j%and8):v=v+sgn(j%and1)-sgn(j%and2)
  60. 610 pokeqw,45:pokeq,100:pokewe,33:forz=1to5:next:pokewe,0
  61. 620 ifpeek(a+h+40*v)=0then650
  62. 630 ifpeek(a+h+40*v)<>43thengoto390
  63. 640 pokea+h+40*v,42:pokeb+h+40*v,2:pokea+h+40*v,43:pokeb+h+40*v,12:goto570
  64. 650 fori=1tor:x1=m(i,2):y1=m(i,1):poke782,x1:poke781,y1:sys65520:prints$;:next
  65. 660 pokeqw,45+r:pokeq,200:pokewe,33:forz=1to25:next:pokewe,0
  66. 670 s=s+20*l:r=r-1:ifr<=0thengoto390
  67. 680 gosub490:goto390
  68. 690 print"[147]":fori=1to9:forj=1to15:printtab(j)" digger[145]"
  69. 700 r=rnd(1)*14+1:poke646,r:fork=1to25:next:next:print"":next
  70. 710 print"[159]copyright (c) 1987 by richard caravella"
  71. 720 printtab(10)"all rights reserved"
  72. 725 print" published by softdisk publishing, inc.": return
  73. 730 print"[147]"tab(11)"[159]this is digger ^":printtab(10)"# = 20 pts. x level"
  74. 740 printtab(10)"[154]$ = 25 pts. x level":printtab(10)"[158]% = 50 pts. x level"
  75. 750 printtab(6)"[159]@ monster = 20 pts. x level":printtab(13)"+ = -5 points"
  76. 760 printtab(8)"[159]hit fire button to start"
  77. 765 printtab(8)"[158]hit f8[158] to exit to uptime"
  78. 770 printtab(4)"[154]hit any other key for directions"
  79. 775 get a$: if a$<>"" then 775
  80. 780 p=peek(56320):if(pand16)=.thenreturn
  81. 790 geta$: if a$=chr$(140) then 1200
  82. 795 if a$="" then 780
  83. 800 gosub 1300: rem read instr. file
  84. 810 if k$=chr$(140) then 1200
  85. 820 return
  86. 830 print"":printtab(14)"[144]game over":fori=1to3:forj=1to16:poke53280,j
  87. 840 pokeqw,45+j:pokeq,148+i:pokewe,33:forz=1to20:next:pokewe,0
  88. 850 next:next:poke53281,0:poke53280,0:print"[147]"
  89. 860 ts=s:ifs>hsthenhs=ts
  90. 870 printtab(12)"[154]final score:"s:printtab(12)"high score:"hs
  91. 880 printtab(5)"[159]hit fire button to play again"
  92. 881 printtab(8)"hit f8 to exit to uptime"
  93. 882 get k$: p=peek(56320)
  94. 883 if (p and 16)=. then 160
  95. 884 if k$<>chr$(140) then 882
  96. 885 goto 1200
  97. 886 rem *** char rom xfer.ml ***
  98. 890 data 120,165,001,041,251,133,001,169
  99. 895 data 208,162,048,160,000,133,252,134
  100. 900 data 254,132,251,132,253,162,008,177
  101. 905 data 251,145,253,200,208,249,230,252
  102. 910 data 230,254,202,208,242,165,001,009
  103. 920 data 004,133,001,088,096
  104. 925 rem *** seq reader.ml ***
  105. 930 data 162,002,160,000,024,032,240,255
  106. 940 data 162,002,032,198,255,032,165,255
  107. 950 data 166,144,134,002,201,047,240,009
  108. 960 data 032,210,255,165,002,041,064,240
  109. 970 data 236,032,204,255,096
  110. 995 rem *** redefined char data ***
  111. 1000 data 000,102,060,102,102,126,219,195,195
  112. 1010 data 035,112,024,024,126,255,255,126,60
  113. 1020 data 036,024,060,255,102,102,102,060,024
  114. 1030 data 037,006,012,024,060,126,255,255,126
  115. 1040 data 030,060,255,195,255,060,102,102,231
  116. 1050 data 031,016,025,153,255,255,153,136,128
  117. 1060 data 042,000,000,060,060,060,000,000,000
  118. 1070 data 043,255,255,255,255,255,255,255,255,-1
  119. 1200 sys (8*4096)+4
  120. 1300 open15,8,15,"i0"
  121. 1310 open2,8,2,"digger docs,s,r"
  122. 1320 gosub 1600: if en<>0 then gosub 1400: return
  123. 1325 p=0
  124. 1330 gosub 1500: rem instr. page header
  125. 1340 sys 49152: rem read seq file
  126. 1350 gosub 1600: if en<>0 then gosub 1400: return
  127. 1360 get k$: if k$<>"" then 1360
  128. 1362 get k$: if k$="" then 1362
  129. 1365 if k$="s" then 1380
  130. 1370 if k$<>chr$(13) then 1362
  131. 1375 if (peek(2) and 64)=0 then 1330
  132. 1380 close2: close15: return
  133. 1400 close2: close15
  134. 1410 print"[147]"spc(13)"[150]disk i/o error"
  135. 1420 printspc(7)"[159]press spacebar to continue"
  136. 1430 get k$: if k$<>chr$(32) then 1430
  137. 1440 return
  138. 1500 print"";: p=p+1
  139. 1510 printspc(25)"[159] page";p;"[157] 0f 6 "
  140. 1520 forx=1to20
  141. 1530 print"                                       "
  142. 1540 next
  143. 1550 printspc(7)"press [153]s[159] to start the game"
  144. 1560 printspc(5)"press [158]return[159] for the next page"
  145. 1570 return
  146. 1600 input#15,en,em$,et,es: return
  147.