home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 5 / 64er_Magazin_Sonderheft_05_86-05_1986_Markt__Technik_de.d64 / multigrafik (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  65 lines

  1. 10 rem **** multigrafik ****
  2. 20 poke 53280,0:poke53281,0
  3. 30 def fn a(x) = 40*sin(x/5)+100
  4. 32 def fn b(x) = 45*sin(x/10)+100
  5. 34 def fn c(x) = 50*sin(x/15)+100
  6. 40 rem --- basic begrenzen ---
  7. 50 poke 52,32:poke 56,32
  8. 60 rem --- farbabfrage -------
  9. 70 printchr$(147)chr$(30)"hintergrundfarbe";:input f0
  10. 80 print"vordergrund 01  ";:input f1
  11. 82 print"vordergrund 10  ";:input f2
  12. 84 print"vordergrund 11  ";:input f3
  13. 90 f = 16*f1 + f2
  14. 100 printchr$(147)
  15. 110 rem --- bitmapmodus einschalten ---
  16. 120 poke 53265,peek(53265) or 32
  17. 130 rem --- bitmapstart auf 8192 ------
  18. 140 poke 53272,peek(53272) or 8
  19. 142 rem --- mehrfarbenmodus ein -------
  20. 144 poke 53270,peek(53270) or 16
  21. 150 rem --- bitmap loeschen (geduld!) -
  22. 160 b = 8192
  23. 170 for i=0 to 7999
  24. 180 :poke b+i,0
  25. 190 next i
  26. 200 rem --- farbgebung (nochmal geduld!)
  27. 210 c = 1024:d=55296
  28. 220 for i=0 to 999
  29. 230 :poke c+i,f
  30. 232 :poke d+i,f3
  31. 240 next i
  32. 242 poke 53281,f0
  33. 250 rem --- punkte zeichnen -----------
  34. 255 pf=1
  35. 260 for x=0 to 159
  36. 270 :y = fna(x)
  37. 280 :gosub 400
  38. 290 next x
  39. 295 pf=2
  40. 300 for x=0 to 159
  41. 302 :y = fnb(x)
  42. 304 :gosub 400
  43. 310 next x
  44. 312 pf=3
  45. 314 for x=0 to 159
  46. 316 :y = fnc(x)
  47. 318 :gosub 400
  48. 319 next x
  49. 320 rem --- warten auf taste ----------
  50. 330 get a$:if a$="" then 330
  51. 340 rem --- normalmodus einschalten ---
  52. 342 poke 53270,peek(53270) and (255-16)
  53. 350 poke 53272,peek(53272) and (255-8)
  54. 360 poke 53265,peek(53265) and (255-32)
  55. 370 printchr$(147)
  56. 380 end
  57. 400 rem --- up punkte setzen ----------
  58. 410 hx=8*int(x/4)
  59. 420 hy=320*int(y/8)+(y and 7)
  60. 430 bx=4^(3-(x and 3))
  61. 440 bm=pf*bx
  62. 450 h1=b+hx+hy
  63. 460 poke h1,(peek(h1) and (not 3*bx)) or bm
  64. 470 return
  65.