home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / commodore-users-of-norman / CUON_02_(08-1984).d64 / potholes (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  3KB  |  132 lines

  1. 10 REM:** COMPUTE GAZETTE SEP 83 **
  2. 20 REM:** POTHOLES **
  3. 30 REM:** U-UP:D-DOWN:L-LEFT:R-RIGHT **
  4. 40 REM:** <CLEAR> RESETS HIGH SCORE **
  5. 70 POKE53280,1:POKE53281,1
  6. 80 PRINT"[147][144]HOLD ON A SECOND WHILE I GET MYSELF     TOGETHER..."
  7. 90 RESTORE:FORI=0TO8:READA:NEXT
  8. 91 POKE56334,PEEK(56334)AND254
  9. 92 POKE1,PEEK(1)AND251
  10. 93 FORI=0TO511:POKE12288+I,PEEK(53248+I):NEXT
  11. 94 POKE1,55:POKE56334,PEEK(56334)OR1
  12. 95 I=12505
  13. 96 READA:IFA<>256THENPOKEI,A:I=I+1:GOTO96
  14. 99 POKE53272,28
  15. 110 GOSUB20000:GOTO1010
  16. 300 GETD$:P=PEEK(203):IFP=64THENHA=4:RETURN
  17. 310 IFP=33THENP=0:GOTO360
  18. 320 IFP=36THENP=1:GOTO360
  19. 330 IFP=34THENP=2:GOTO360
  20. 340 IFP=37THENP=3:GOTO360
  21. 350 RETURN
  22. 360 IFPEEK(A+M(P))=33THENRETURN
  23. 370 HA=P:RETURN
  24. 400 IFHB<>4THENB1=B+M(HB)
  25. 402 IFCN>0THENRETURN
  26. 403 IFCN=0THENHB=4:RETURN
  27. 405 HY=INT((B-VR+1)/40)-INT((A-VR+1)/40)
  28. 410 HX=B-A-HY*40:CN=3
  29. 420 IFABS(HX)>ABS(HY)THEN450
  30. 430 IFHY>=0THENHB=0:RETURN
  31. 440 HB=1:RETURN
  32. 450 IFHX>0THENHB=2:RETURN
  33. 460 HB=3:RETURN
  34. 500 IFHA=4THENRETURN
  35. 510 A1=A+M(HA):D=PEEK(A1)
  36. 520 IFD=32THENRETURN
  37. 530 IFD=31THEN560
  38. 540 IFD=33THENHA=4:RETURN
  39. 550 OV=1:RETURN
  40. 560 S=S+TE:PO=PO-1
  41. 570 POKE214,3:S$=STR$(S):SL=LEN(S$):PRINTSPC(22-SL)MID$(S$,2,SL-1)
  42. 580 RETURN
  43. 600 IFHB=4THENRETURN
  44. 610 B1=B+M(HB):D=PEEK(B1)
  45. 620 IFD=32ORD=31THENRETURN
  46. 630 OV=1:RETURN
  47. 1000 GOTO6000
  48. 1010 GOSUB10000
  49. 1020 GOSUB1100:GOSUB1200
  50. 1040 IFOV=1THEN1700
  51. 1050 IFPO=0THEN1500
  52. 1060 GOTO1020
  53. 1100 IFHA<>4THENPOKEA,32:A=A1:POKEA,CH(HA):POKEA+CR,2
  54. 1110 GOSUB300:GOSUB500
  55. 1120 RETURN
  56. 1200 IFHB<>4THENPOKEB,UN:POKEB+CR,7:B=B1:UN=PEEK(B):POKEB,CH(HB):POKEB+CR,14
  57. 1210 CN=CN-1
  58. 1220 GOSUB400:GOSUB600
  59. 1230 RETURN
  60. 1500 GOSUB1100:POKE214,15:PRINT""SPC(16)"BONUS"
  61. 1510 BO=TE*20:S=S+BO:TE=TE+5
  62. 1520 PRINTSPC(16)BO
  63. 1530 GOSUB3000:FORI=0TO500:NEXT:GOTO1010
  64. 1700 GOSUB1100
  65. 1710 POKEB,32:POKEA,42
  66. 1720 GOSUB3200
  67. 1730 CA=CA-1:OV=0:IFCA=0THEN4000
  68. 1740 GOTO1010
  69. 3000 FORSL=0TO20
  70. 3010 FORS1=0THE40:NEXT
  71. 3020 FORS1=0TO20:NEXT:NEXT
  72. 3030 RETURN
  73. 3100 FORSL=0TO30
  74. 3110 FORS1=0TO10:NEXT
  75. 3120 FORS1=0TO10:NEXT:NEXT
  76. 3130 RETURN
  77. 3200 FORSL=15TO0STEP-1
  78. 3220 FORS1=0TO9:NEXT:POKEA+CR,4
  79. 3230 FORS1=0TO9:NEXT:POKEA+CR,1:NEXT
  80. 3250 RETURN
  81. 4000 GOSUB3100
  82. 4001 PRINT""
  83. 4010 FORS1=0TO18
  84. 4020 PRINT"             ":NEXT
  85. 4030 POKE214,6
  86. 4031 PRINT"* GAME OVER *"
  87. 4040 IFS>HSTHENHS=S:PRINT"[159]TOP SCORE..."
  88. 4050 PRINT"TRY AGAIN?"
  89. 4060 PRINTSPC(7)"<Y/N>"
  90. 4070 POKE214,10:S$=STR$(HS):SL=LEN(S$)
  91. 4071 PRINT""SPC(22-SL)MID$(S$,2,SL-1)
  92. 6000 GETD$:IFD$=""THEN6000
  93. 6010 IFD$="Y"THEN6100
  94. 6020 IFD$="N"THENPRINT"[147][144]":END
  95. 6030 IFD$="[147]"THENRUN
  96. 6040 GOTO6000
  97. 6100 CA=3:S=0:TE=5
  98. 6110 GOTO1010
  99. 10000 PRINT"[147] ** POTHOLES **"
  100. 10010 PRINT"[158]!!!!!!!!!!!!!!!"
  101. 10020 FORI=0TO5
  102. 10030 PRINT"!_____________!"
  103. 10040 PRINT"!_!!_!!_!!_!!_!"
  104. 10050 PRINT"!_!!_!!_!!_!!_!":NEXT
  105. 10060 PRINT"!_____________!"
  106. 10065 PRINT"!!!!!!!!!!!!!!!"
  107. 10070 PRINT"_ ="TE;TAB(10)"["CA;
  108. 10080 PRINT""SPC(16)"SCORE"
  109. 10090 S$=STR$(S):SL=LEN(S$):PRINTSPC(22-SL)MID$(S$,2,SL-1)
  110. 10100 PRINT""SPC(17)"HIGH"
  111. 10110 PRINT""SPC(16)"SCORE"
  112. 10120 S$=STR$(HS):SL=LEN(S$):PRINTSPC(22-SL)MID$(S$,2,SL-1)
  113. 10130 A=81+VR:B=813+VR:UN=31
  114. 10140 POKEA,28:POKEA+CR,2
  115. 10150 POKEB,27:POKEB+CR,14
  116. 10200 HA=4:HB=4:PO=150:CN=20
  117. 10210 PRINT"":RETURN
  118. 20000 DIMM(3),CH(3)
  119. 20010 VR=1024:CR=54272:CA=3:TE=5:OV=0
  120. 20020 RESTORE:FORI=0TO3:READM(I),CH(I):NEXT
  121. 20030 DATA-40,27,40,28,-1,29,1,30
  122. 20040 REM:POKE36878,10
  123. 20050 RETURN
  124. 30000 DATA84,124,84,16,16,186,254,186
  125. 30010 DATA186,254,186,16,16,84,124,84
  126. 30020 DATA14,228,78,254,254,78,228,14
  127. 30030 DATA112,39,114,127,127,114,39,112
  128. 30040 DATA0,0,24,24,24,0,0,0
  129. 30050 DATA0,0,0,0,0,0,0,0
  130. 30060 DATA170,85,170,85,170,85,170,85
  131. 30070 DATA0,0,0,0,0,0,0,256
  132.