home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1985 February
/
64er_Magazin_85-02_1985_Markt__Technik_de.d64
/
hires-3_1-test
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
57 lines
1 rem *********************************
2 rem * *
3 rem * grafik - demo *
4 rem * zum *
5 rem * testen des ersten teils von *
6 rem * *
7 rem * h i r e s - 3 *
8 rem * *
9 rem *auch von mir(h.ponnath hh 1984)*
10 rem*********************************
20 poke52,128:poke56,128:sys37498:rem einschalten der neuen basic-befehle
25 rem ---------- der lin-befehl -------
30 deffna(x)=(y2-y1)*(x-x1)/(x2-x1)+y1:deffnb(z)=(y4-y3)*(z-x3)/(x4-x3)+y3
35 deffnc(i)=x1+i*(x2-x1)/10:deffnd(i)=x3+i*(x4-x3)/10
40 deffne(i)=x4-i*(x4-x3)/10
45 x1=10:x2=100:x3=190:x4=310:y1=10:y2=170:y3=195:y4=15
50 hfl,1,6
55 fori=0to10step.5:x=fnc(i):z=fnd(i):lin,x,fna(x),z,fnb(z):next
60 lin,x1,y1,x2,y2:lin,x3,y3,x4,y4
65 pau,5
70 hof:printchr$(147)"das war der lin-befehl":print:print"pau,hfl u. hof funktionieren auch
75 pau,5
80 [143] ----------- der rec-befehl ------
85 loe:han
90 [150][165]z(x)[178][171]3.39098e[171]3[172]x[174]2[170]1.053668[172]x[170]8.9497:x1[178]200:y1[178]198:x2[178]310:y2[178]5
95 x3[178]2:x4[178]309:e[178]60
100 [129]i[178]0[164]e:xu[178]x2[171]i[172](x2[171]x1)[173]e:yu[178][165]a(xu):xo[178]x4[171]i[172](x4[171]x3)[173]e:yo[178][165]z(xo)
105 rec,xo,yo,xu,yu:[130]i:pau,3
110 far,6,1:pau,2:far,0,7:pau,1:far,2,8:pau,1:loe:pau,1:hof:[153]
115 [153]"das waren die befehle rec,far und loe":pau,5
120 [143] -- pkt,blo,cir,lbk und lre -----
125 han:blo,40,100,160,150:blo,180,100,200,150:blo,200,120,250,150
130 blo,240,100,250,120:lbk,44,102,68,120:lbk,72,102,98,120:lbk,102,102,128,120
135 lbk,132,102,156,120:lbk,182,102,198,148:lre,44,122,68,148
140 lre,132,122,156,148:lin,160,145,180,145:cir,45,155,5,5,2[172][255]
145 cir,55,155,5,5,2[172][255]:cir,155,155,5,5,2[172][255]:cir,145,155,5,5,2[172][255]
150 cir,185,155,5,5,2[172][255]:cir,195,155,5,5,2[172][255]:cir,245,155,5,5,2[172][255]
155 lin,0,160,319,160:lin,0,163,319,163
160 [129]k[178]1[164]10:[129]j[178]1[164]235
165 v[178][181]([187](1)[172]20)[170]235[171]j:w[178][181]([187](1)[172]100[171]j[173]3):[139]w[177]0[175]v[177]0[167]:pkt,v,w:[130]
170 [130]k:pau,5:hof
175 [153]:[153]"dieser zug fuhr mit:pkt,blo,cir,lbk,lre":pau,5
180 [143] ------ rad und lra -------------
185 hfl,0,6:[129]l[178]0[164]3[172][255][169][255][173]30:rad,160,100,[181](10[172]l),[181](10[172]l),l
190 [130]l:pau,4:[129]l[178]0[164]3[172][255][169][255][173]15:lra,160,100,[181](7[172]l),[181](7[172]l),l:[130]l
195 pau,4:hof:[153]:[153]"sowohl rad als auch lra funktionieren":pau,4
200 [143] ------ lpk,lln,lkr -------------
205 [151]53280,0
210 hfl,6,14:blo,20,10,300,190:x(1)[178]60:x(2)[178]120:x(3)[178]170:x(4)[178]200:x(5)[178]201
215 x(6)[178]240:x(7)[178]260:y(1)[178]65:y(2)[178]42:y(3)[178]70:y(4)[178]100:y(5)[178]135:y(6)[178]150
220 y(7)[178]117:[129]i[178]1[164]7:lkr,x(i),y(i),2,2,2[172][255]:lkr,x(i),y(i),1,1,2[172][255]:[130]i
225 [129]i[178]2[164]7:lln,x(i[171]1),y(i[171]1),x(i),y(i):[130]i:lln,x(7),y(7),x(4),y(4)
230 [129]i[178]0[164]500:v[178][181]([187](1)[172]280)[170]20:w[178][181]([187](1)[172]180)[170]10:lpk,v,w:[130]i:pau,3
235 [151]53280,14:hof:[153]:[153]"der grosse wagen wurde gebildet mit"
240 [153]"den befehlen:lln,lpk und lkr":[153]:[153]:[151]646,1:[153]"alles o.k!"
245 [151]646,14:[128]