home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 52 / 052.d81 / mandelbrot (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  187 lines

  1. 4 forx=53248to53263:pokex,.:next
  2. 5 ifa>0 then 14
  3. 10 gosub 500
  4. 14 forn=896to958:reada:poken,a:next
  5. 16 data255,255,255,128,0,1,128,0,1,128,0,1,128,0,1,128,0,1,128,0,1
  6. 18 data128,0,1,128,0,1,128,0,1,128,0,1,128,0,1,128,0,1,128,0,1,128,0,1
  7. 20 data128,0,1,128,0,1,128,0,1,128,0,1,255,255,255,255,255,255
  8. 22 hp=160:vp=100:poke2040,14
  9. 24 poke49500,18
  10. 26 poke53272,21:poke53265,27:poke53270,200
  11. 28 rem mandelbrot program c-64
  12. 30 poke53280,.:poke53281,.
  13. 32 print"[147]   [205]andelbrot [208]rogram [195]-64 [205]ain [205]enu"
  14. 34 print"      1[152])[154] [214]iew directory"
  15. 36 print"      2[152])[154] [204]oad [205]andelbrot picture"
  16. 38 print"      3[152])[154] [214]iew [205]andelbrot picture"
  17. 40 print"      4[152])[154] [201]nput coordinates"
  18. 42 print"      5[152])[154] [195]hange colors"
  19. 44 print"      6[152])[154] [214]iew & create [205]andelbrot "
  20. 46 print"      7[152])[154] [211]ave [205]andelbrot picture"
  21. 48 print" [160]    8[152])[154] [209]uit back to [158][204][207][193][196][211][212][193][210]"
  22. 50 print"[160] [155]         [205]enu choice 1 - 8"
  23. 51 geta$:ifa$="" then 51
  24. 52 ifa$<"0"then51
  25. 54 ifa$>"8"then51
  26. 56 on val(a$)goto 268,246,282, 60,152,170,226,167
  27. 58 print"error, please enter number between 1-8":goto50
  28. 60 print"[147]       [197]nter new coordinates.."
  29. 61 print" [154][197]nter [216][204][152]:";:nu=1:gosub300:xl=val(a$):
  30. 62 print" [154][197]nter [216][210][152]:";:gosub300:xr=val(a$)
  31. 63 print" [154][197]nter [217][212][152]:";:gosub300:yt=val(a$):
  32. 64 print" [154][197]nter [217][194][152]:";:gosub300:yb=val(a$)
  33. 65 print"[147]  [193]re these the coordinates you want"
  34. 66 print"         [154][216][204][152] = ";xl:print"         [154][216][210] [152]= ";xr
  35. 67 print"[154]  [160]      [217][212] [152]= ";yt:print"         [154][217][194] [152]= ";yb
  36. 68 print"[152]         ( [217][152]/[206][152] or [205][152] for menu)":
  37. 69 geta$:ifa$="" then 69
  38. 70 ifa$="y"then 78
  39. 72 ifa$="n" then 60
  40. 74 if a$="m" then26
  41. 76 goto69
  42. 78 print"[147]"
  43. 80 print"  [154]  [197]nter [152](1[152])[154] to proceed to [196][210][193][215]
  44. 82 [153]"  cont  valnter print#(2print#) contto return to (NULL)val(NULL)(NULL)"
  45. 84 [153]"             print#(valnter 1print# or 2print#)"
  46. 85 [161]a$:[139]a$[178]""[167] 85
  47. 86 [139]a$[178]"1" [167]94
  48. 88 [139]a$[178]"2" [167] 26
  49. 89 [137] 85
  50. 92 [143] coordinates
  51. 94 dx[178](xr[171]xl):dy[178](yb[171]yt)
  52. 96 [151]53265,[194](53265)[176]32:[151]53270,[194](53270)[176]16
  53. 98 [151]53272,[194](53272)[176]8:[153]"contload";:
  54. 100 [129]i[178]8192[164]16191:[151]i,0:[130]
  55. 102 [129]i[178]1024[164]2023:[151]i,16[170]2:[130]
  56. 104 [151]53280,0
  57. 106 [151]53281,3
  58. 108 ba[178]8192:sm[178]3:ct[178]48
  59. 110 [129]x0[178]xl[164]xr[169](dx)[173]159
  60. 112 [129]y[178]yt[164]yb[169](dy)[173]199
  61. 114 a[178]x0[172]x0[171]y[172]y[170]x0:b[178]2[172]x0[172]y[170]y:c[178]0
  62. 116 r[178]a[172]a[171]b[172]b[170]x0:i[178]2[172]a[172]b[170]y:c[178]c[170]1
  63. 118 a[178]r:b[178]i
  64. 120 [139]r[179][171]10[174]16[167]134
  65. 122 [139]r[179]sm[167][139]c[179]ct[167]116
  66. 124 x1[178][181]((x0[171]xl)[173]((dx)[173]159))
  67. 126 y1[178][181]((y[171]yt)[173]((dy)[173]199))
  68. 128 [139]c[179]4 [167][141]144:[137]134
  69. 130 [139]c[179]6 [167][141]146:[137]134
  70. 132 [139]c[179]48[167][141]148
  71. 134 [139]x1[178][177]158[167]150
  72. 136 [130] y,x0
  73. 138 x[178]2[172]x1
  74. 140 ro[178][181](y1[173]8):ch[178][181](x[173]8):ln[178]y1[175]7:bi[178]7[171](x[175]7):by[178]ba[170]ro[172]320[170]ch[172]8[170]ln
  75. 142 [151]by,[194](by)[176]2[174]bi:[142]
  76. 144 x[178]2[172]x1[171]1 :[141]140:[142]
  77. 146 [141]138:[142]
  78. 148 [141]138:x[178]x[171]1:[141]140:[142]
  79. 150 [137]26
  80. 152 [143] change colors
  81. 154 [151]53265,[194](53265)[176]32:[151]53270,[194](53270)[176]16
  82. 156 [151]53272,[194](53272)[176]8:[153]"contload";:
  83. 158 [129]x[178]1[164]255
  84. 160 [129]i[178]1024[164]2023:[151]i,x:[130]i
  85. 162 [161]k$:[139]k$[178]""[167]162
  86. 164 [139]k$[178]"q"[167][151]49500,x:[137]26
  87. 166 [130]x :[137]26
  88. 167 [159]15,8,15,"r0:hello connect=hello connect":[132]15,er,er$:[160]15
  89. 168 [139]er[179][177]63 [167] [153]"load":[128]
  90. 169 [147]"hello connect",8,1
  91. 170 [151]650,128
  92. 172 vic[178]53248:[151]vic,hp :[151]vic[170]1,vp :[151]vic[170]39,13
  93. 174 [151]53265,[194](53265)[176]32:[151]53270,[194](53270)[176]16
  94. 176 [151]53272,[194](53272)[176]8:[153]"contload";:
  95. 178 x[178][194](49500)
  96. 180 [129]i[178]1024[164]2023:[151]i,x:[130]
  97. 182 [151]vic[170]21,1
  98. 184 [161] a$
  99. 186 [139]a$[178]""[167]184
  100. 188 [139]a$[178]"l"[167]hp[178]hp[171]1:[137]214
  101. 190 [139]a$[178]"r"[167]hp[178]hp[170]1:[137]214
  102. 192 [139]a$[178]"u"[167]vp[178]vp[171]1:[137]220
  103. 194 [139]a$[178]"d"[167]vp[178]vp[170]1:[137]220
  104. 196 [139]a$[178]"e"[167]200
  105. 198 [137]184
  106. 200 hp[178]hp[171]24:hp[178]hp[173]2:vp[178]vp[171]50
  107. 202 dx[178](xr[171]xl):dy[178](yb[171]yt)
  108. 204 xr[178](xl)[170]((hp[170]24)[172](dx[173]159)):xl[178](xl)[170]((hp)[172](dx[173]159))
  109. 206 yb[178](yt)[170]((vp[170]21)[172](dy[173]199)):yt[178](yt)[170]((vp)[172](dy[173]199))
  110. 208 [151]vic[170]21,0:[151]vic[170]39,0
  111. 210 [151]53272,21:[151]53265,27:[151]53270,200
  112. 212 [137]65
  113. 214 sf[178](hp[177]255)
  114. 216 [151]vic,hp[170](sf[172]256)
  115. 218 [151]vic[170]16,sf[172]([171]1)
  116. 220 [151]vic[170]1,vp
  117. 222 [137]184
  118. 224 [151]vic[170]1,vp
  119. 226 [143] save coordinates & binary pic
  120. 228 [153]"load"
  121. 230 [153]"":[153]"  valnter filename:";:nu[178]0:[141]300:f$[178]a$:[139]a$[178]""[167]30
  122. 232 [159]1,8,2,"@0:"[170]f$[170]".num,s,w"
  123. 234 [152]1, xl:[152]1, xr
  124. 236 [152]1, yt:[152]1, yb
  125. 238 [160]1
  126. 240 [158]57812f$[170]".pic",8:[151]173,8192[173]256
  127. 241 [151]172,8192[171][194](173)[172]256:[151]780,172
  128. 242 [151]782,16191[173]256:[151]781,16191[171][194](782)[172]256:[158]65496
  129. 244 [137]28
  130. 246 [143] load coordinates & binary pic
  131. 248 [153]"load":[153]""
  132. 250 [153]"  valnter filename:";:nu[178]0:[141]300:f$[178]a$:[139]a$[178]""[167]30
  133. 252 [159]3,8,3,f$[170]".num,s,r"
  134. 254 [132]3,xl,xr,yt,yb
  135. 256 [160]3
  136. 258 [151]53265,[194](53265)[176]32:[151]53270,[194](53270)[176]16
  137. 260 [151]53272,[194](53272)[176]8
  138. 262 [129]i[178]1024[164]2023:[151]i,18:[130]
  139. 264 [147]f$[170]".pic",8,1
  140. 266 [128]
  141. 268 [143] directory
  142. 270 [153]"load"
  143. 272 [158]57812"$",8:[151]43,1:[151]44,192:[151]768,174:[151]769,167:[158]47003,1
  144. 274 [151]782,192:[158]65493:[158]42291:[155]:[151]44,8:[151]768,139:[151]769,227
  145. 276 [153]:[153]:[153]"press any key to continue"
  146. 278 [161] k$:[139]k$[178]""[167]278
  147. 280 [137]28
  148. 282 [151]53265,[194](53265)[176]32:[151]53270,[194](53270)[176]16
  149. 284 [151]53272,[194](53272)[176]8:[153]"contload";
  150. 286 x[178][194](49500)
  151. 288 [129]i[178]1024[164]2023:[151]i,x:[130]
  152. 290 [161] k$
  153. 292 [139]k$[178]""[167]290
  154. 294 [137]26
  155. 300 a$[178]"":[153]"tocmd";:
  156. 310 [161]b$:[139]b$[178]""[167]310
  157. 311 [139]b$[178][199](20)[175][195](a$)[177]0 [167][153]b$" cmdtocmd";:a$[178][200](a$,[195](a$)[171]1):[137]310
  158. 312 [139]b$[178][199](20)[167]310
  159. 313 [139][195](a$)[177]10 [167] 310
  160. 315 [139]b$[178][199](13) [167] [153]" ":[142]
  161. 316 [139]nu[178]1[167] [139]b$[179]"-"[176]b$[177]"9" [167] 310
  162. 317 [139]b$[179]" "[176]b$[177]"z"[175]b$[179]"atn"[176]b$[177]"(NULL)"[167]310
  163. 320 a$[178]a$[170]b$:[153]b$"tocmd";:[137]310
  164. 500 [151]53272,21:[151]53265,27:[151]53270,200
  165. 501 [151]53265,[194](53265)[175]239
  166. 502 [151]53280, 6:[151]53281, 1:[153]"loadreturn";
  167. 505 [153]"list                                                                      ";
  168. 510 [153]"               cont                             list           cont      loadstar";
  169. 515 [153]" presents      print# list          cont                             print# list          cont";
  170. 520 [153]"    waitOusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrPcont    print# list          cont    waitsgnmandelbrot";
  171. 525 [153]"then cont   print# list          cont    waitLandandandandandandandandandandandandandandandandandandandsqr cont   print# list          ";
  172. 530 [153]"cont                          cont   print# list          cont                          ";
  173. 535 [153]"   print# list          cont     waitclrOusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrusrPcont     print# list          cont     waitclrfn";
  174. 540 [153]"byjohniovineclrthen cont    print# list          cont     waitclrLandandandandandandandandandandandandandandandandandsqr cont";
  175. 545 [153]"    print# list          cont