home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1986 January / 64er_Magazin_86-01_1986_Markt__Technik_de.d64 / life (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  70 lines

  1. 10 rem-------------------------
  2. 20 rem**   life fuer c-64   **
  3. 25 rem-------------------------
  4. 30 rem** juergen engbring   **
  5. 40 rem** henkelshof 5-7     **
  6. 50 rem** 5630 remscheid-11  **
  7. 60 rem** tel. 02191/65533   **
  8. 70 rem-------------------------
  9. 80 m=49152:fori=0to9:reada
  10. 85 ifa<>peek(m)thenload"maschlife",8,1
  11. 90 m=m+100:next
  12. 95 data169,88,87,206,2,152,0,192,45,0
  13. 100 print"[147]"
  14. 110 sys49971: rem initialisierung
  15. 120 pl=50117: rem syspl,x,y,0/1/2
  16. 130 :n=50167: rem naechste generation
  17. 140 :s=50173: rem maximale geschw.
  18. 150 :g=50087: rem sysg,x,y zelle  lebt
  19. 155 ba=6*4096:rem basis zellspeicher
  20. 160 qq=50198: rem testbyte syspl,x,y,2
  21. 170 rem+++++++++++++++++++++++++++++++++
  22. 990 rem===  80 x 40 zelleditor  ========
  23. 1000 dimg%(255):x=39:y=24:q=ti:ch=29
  24. 1005 fori=0to6:reada:readb:g%(a)=b:next
  25. 1010 data17,1,29,2,145,3,157,4,20,5,32,6,76,7
  26. 1020 geta$:ifti-q>15thenq=ti:w=1-w
  27. 1030 syspl,x,y,w
  28. 1040 ifa$=""then1020
  29. 1050 a=asc(a$)
  30. 1060 ong%(a)goto1100,1200,1300,1400,1500,1600,1700
  31. 1070 goto1020
  32. 1100 syspl,x,y,z:y=y+1:ch=17
  33. 1110 ify>49theny=0
  34. 1120 goto1450
  35. 1200 syspl,x,y,z:x=x+1:ch=29
  36. 1210 ifx>79thenx=0
  37. 1220 goto1450
  38. 1300 syspl,x,y,z:y=y-1:ch=145
  39. 1310 ify<0theny=49
  40. 1320 goto1450
  41. 1400 syspl,x,y,z:x=x-1:ch=157
  42. 1410 ifx<0thenx=79
  43. 1420 goto1450
  44. 1450 syspl,x,y,2:z=peek(qq)
  45. 1460 goto1020
  46. 1500 z=0:a=ch:pokeba+3*x+y*240,0
  47. 1510 goto1060
  48. 1600 z=1:a=ch
  49. 1610 sysg,x,y:goto1060
  50. 1700 syspl,x,y,z
  51. 2000 t=9999:rem minimale verzoegerung
  52. 2005 poke50209,2:rem vor erstem sysn
  53. 2010 geta$:ifti-q>tthenq=ti:sysn
  54. 2020 ifa$=""then2010
  55. 2030 ifa$=" "thensysn:t=9999:goto2010
  56. 2040 ifa$="s"thent=99999
  57. 2050 ifa$="n"thenrun
  58. 2055 ifa$="e"goto2300
  59. 2060 ifa$="q"then:end
  60. 2065 ifa$="p"thensyss
  61. 2067 ifa$=chr$(133)goto2200
  62. 2070 a=asc(a$)
  63. 2080 ifa<134ora>140goto2010
  64. 2090 t=2*2^(a-134)
  65. 2100 goto2010
  66. 2200 geta$:ifa$=""thensysn:goto2200
  67. 2210 goto2020
  68. 2300 ifpeek(50202)=1thensysn
  69. 2310 poke50209,0:goto1020
  70.