home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1984 November / 64er_Magazin_84-11_1984_Markt__Technik_de.d64 / supergrafik (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  843b  |  26 lines

  1. 1 deffnf(x)=sin(x)
  2. 2 print"[147]**funktion+ableitung**":print"r.doerr":print"gunzenhausen,30.3.1984"
  3. 8 print"funktion in zeile 1   definieren!"
  4. 15 input"xmax";xm:input"ymax";ym
  5. 20 p=36864:pokep+3,161:poke55,0:poke56,20:pokep+1,18:pokep,10:pokep+2,153:print"[147]"
  6. 25 poke0,10:poke1,0:fori=828to846:readp:pokei,p:next:poke2,20:sys828
  7. 30 poke36869,253:fa=6
  8. 90 y=128:forx=96to102:gosub4000:next:x=99:fory=125to131:gosub4000:next
  9. 97 fa=2:d=0:sh=0.000001:h=.0001
  10. 100 forx=0to199
  11. 110 xw=xm*(2*x/199-1):yw=(fnf(xw+d*h+sh)-d*fnf(xw+sh))/((h-1)*d+1):y=(1-yw/ym)*127.5
  12. 115 ify<0ory>255.4then130
  13. 120 gosub4000
  14. 130 next
  15. 140 ifd=1then200
  16. 150 fa=7:d=1:goto100
  17. 200 geta$:ifa$=""then200
  18. 210 end
  19. 4000 :
  20. 4010 y=int(y+.5):x=int(x+.5):xs=int(x/8):ys=int(y/16)
  21. 4040 by=y-ys*16:bi=7-x+xs*8:z=7680+xs+25*ys:zf=z+30720
  22. 4050 ifpeek(z)=32thenbc=bc+1:pokez,bc:pokezf,fa
  23. 4055 ifbc>158then200
  24. 4060 bs=peek(z):b=5120+16*bs+by:p=peek(b):p=por2^bi:pokeb,p:return
  25. 5000 data162,0,169,0,160,0,145,1,200,208,251,230,2,232,228,0,208,242,96
  26.