home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 7 / 64er_Magazin_Sonderheft_07_86-07_1986_Markt__Technik_de_Side_A.d64 / hires-sinus (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  801b  |  28 lines

  1. 100 rem sinuskurve in hi-res
  2. 110 rem
  3. 120 rem grafik ein
  4. 130 vic=53248
  5. 140 poke vic+17, peek(vic+17) or 11*16:rem grafik ein
  6. 150 poke vic+22, peek(vic+22) and 255-16:rem muticolor ein
  7. 155 poke vic+24, peek(vic+24) or 8:rem vic-arbeitsbereich auf $0000-$3fff
  8. 160 rem grafikbild loeschen
  9. 170 gb=8192:rem staradresse grafik
  10. 180 for x=gb to gb+8000:pokex,0:next x
  11. 190 rem farbwerte setzen
  12. 200 vr=1024:rem startadresse hires-farbram (=videoram)
  13. 220 farbe=0*16+14:rem hintergrund hellblau  punkte schwarz
  14. 240 for x=vr to vr+1000:poke x,farbe:next x
  15. 251 poke53280,0
  16. 260 rem sinuskurve zeichnen
  17. 270 for x=0 to 319
  18. 280 y=70* sin(x/25.6) +99
  19. 290 gosub51000
  20. 300 next x
  21. 9999 end
  22. 51000 rem grafikpunkt setzen (hires)
  23. 51010 ga=8192:rem startadresse grafikspeicher
  24. 51020 ad=320 * int(y/8) + (y and 7) + (8 * int(x/8)):rem adresse berechnen
  25. 51030 bn=7-(x and 7):rem bitnummer berechnen
  26. 51040 pokega+ad, peek(ga+ad) or 2^bn
  27. 51050 return
  28.