home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 October / 1989-10.d64 / diamonds.demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  874b  |  38 lines

  1. 100 rem copyright 1989 compute! publications, inc. - all rights reserved
  2. 110 print"[147]   copyright 1989 compute! pub., inc."
  3. 120 printtab(11)"all rights reserved"
  4. 130 poke2,0:poke3,2:poke4,6:poke5,7
  5. 140 j=251:k=252:l=253:m=254:d=16384
  6. 150 pokej,40:pokek,25:r=1:gosub440
  7. 160 forx=0toq:pokel,x:sysd:next
  8. 170 q=q+r:ifq=16thenr=-1
  9. 180 pokem,rnd(0)*256:ifq>0then160
  10. 190 getk$:ifk$=""then150
  11. 200 e=16:gosub410
  12. 210 forx=24to0step-1
  13. 220 ifxand4thenpokem,rnd(0)*256
  14. 230 pokel,x:sysd:next:getk$
  15. 240 ifk$=""thengosub440:goto210
  16. 250 e=24:gosub410
  17. 260 pokem,rnd(0)*256:forx=0to65
  18. 270 ifrnd(0)>.8thenpokem,rnd(0)*256
  19. 280 pokel,x:sysd:next
  20. 290 gosub440:getk$:ifk$=""then260
  21. 300 e=65:gosub410
  22. 310 q=2+((q+1)and15):pokem,rnd(0)*256
  23. 320 forx=0to64stepq:pokel,x:sysd:next
  24. 330 gosub450:getk$:ifk$=""then310
  25. 340 gosub410:forx=0to4:a(x)=2^x:next
  26. 350 pokej,80*rnd(0):pokek,50*rnd(0)
  27. 360 forx=110to0step-1:pokel,x:sysd
  28. 370 ifxanda(n)thenpokem,256*rnd(0)
  29. 380 next:n=n+1:ifn=5thenn=1
  30. 390 getk$:ifk$=""thengosub440:goto350
  31. 400 print"":end
  32. 410 pokej,40:pokek,25:pokem,0
  33. 420 forx=eto0step-1:pokel,x:sysd:next
  34. 430 poke254,256*rnd(0):poke198,0:return
  35. 440 fort=1to1000:next
  36. 450 ifpeek(653)then450
  37. 460 return
  38.