home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 53
/
64er_Magazin_Sonderheft_53_19xx_Markt__Technik_de_Side_A.d64
/
testdemo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
10KB
|
310 lines
1 rem *********************************
2 rem ** 'testdemo' demonstrations- **
3 rem ** programm fuer **
4 rem ** 'gr2001' - befehle **
5 rem ** --------------------------- **
6 rem ** dr.h.domes (1986) **
7 rem ** josef marx str. 13 **
8 rem ** a - 8043 graz / austria **
9 rem *********************************
20 le$=" "
30 deffnbo(wi)=wi*2*(NULL)/360
250 goto700
300 poke198,0:wait198,1:(NULL) :return
350 (NULL)zm,x0,y0,x1,y1 :return
360 (NULL)zm,x0,y0,fnbo(wi),l1,l2:return
400 (NULL)zm,x0,y0,x1,y1,ri,sw:return
450 (NULL) zm,r,b,h,v,a,x0,y0,a$ :return
500 (NULL)zm,x1%,y1%,x2%,y2%:return
520 (NULL)hv,sz,of:return
550 ifzx<40andzy<25thenpoke214,zy:poke211,zx:sys58640
600 return
650 rem******************************
700 (NULL)1:(NULL)4,0:(NULL):print"[147][156]";chr$(8)
750 forx=0to319step8:fory=00to68step8 :(NULL)x,y,1,2:(NULL)x,199-y,1,2
800 (NULL)x,71+y,2,1:next:next:(NULL)255
900 zm=2:r=1:b=2:h=3:v=15:a=16:x0=46:y0=10:reada$:gosub450
950 :
1000 (NULL)5,2:zm=0:r=1:b=2:h=3:v=15:a=16:x0=46 :y0=40:reada$:gosub450
1050 :
1100 zm=2:r=1:b=1:h=1:v=8 :a=16:x0=30:y0=88:reada$:gosub450
1150 :
1200 zm=0:r=1:b=2:h=3:v=15:a=16:x0=46:y0=100:reada$:gosub450
1250 :
1300 (NULL)14,2
1350 zm=0:r=1:b=2:h=3:v=15:a=16:x0=46:y0=140:reada$:gosub450
1400 :
1450 zm=2:r=1:b=1:h=1:v=8 :a=8 :x0=56:y0=175:reada$:gosub450
1500 :(NULL)0,0
1550 read x1,y1,x2,y2:(NULL)0,x1,y1,x2,y2:
1600 read x1,y1,x2,y2:(NULL)0,x1,y1,x2,y2
1650 (NULL)0,0:
1660 gosub2050:poke198,0
1700 gosub50170
1710 bl=1:(NULL)0:gosub50270
1719 rem-------------------------------
1720 oni gosub 2150,2550,55000,6850,7400,52000,3800,3800,1800
1721 rem-------------------------------
1750 goto1710
1800 (NULL)255:(NULL)255:(NULL)
1810 print"[147][144]beep:l[207]"chr$(34)"gra1"chr$(34)",8":print"run"
1820 poke631,19:fori=1to3:poke631+i,13:next:poke198,4:end
2001 rem****** vorspann ***************
2050 print"[147]":(NULL):(NULL)4,0:(NULL)4,0:(NULL)0
2100 a$="demo grafik"
2110 zm=0:r=1:b=1:h=1:v=0:a= 7:x0=01:y0=02:gosub450
2115 a$="befehle: 2001 ":y0=12:gosub450
2120 (NULL)0,0:y=0:forx=0to70step8:ifpeek(203)<>64then2140
2125 (NULL)x,y:next:print"<taste>[146]";
2130 print"":forx=70to80step2:ifpeek(203)<>64then2140
2135 (NULL)x,y:next:print"[156]":ifpeek(203)=64then2100
2140 gosub300:(NULL):return
2149 rem***** recht ***************
2150 (NULL):zm=0:r=1:b=1:h=1:v=0:a= 8:x0=01:y0=2:a$="recht"
2160 gosub450:(NULL)0,0:gosub300:(NULL)
2170 print"[159]":(NULL)0,0:gosub300:print"[156]"
2180 (NULL)
2199 rem*******************************
2200 y0=peek(162)and100:zm=2:yz=1:ax=2:ay=2:rem schrittweite
2250 (NULL):(NULL)1
2300 forx0=0to159stepax:y0=y0+ay*yz:ify0>199thenyz=-1:y0=y0+ay*yz:(NULL)
2350 ify0<0thenyz=1:y0=y0+ay*yz:(NULL)
2400 x1=319-x0:y1=199-y0:gosub350:next
2450 ifax<3then(NULL):ax=ax+2:goto2300
2460 gosub300:(NULL):return
2500 rem*********************************
2550 (NULL):(NULL)1:zm=0:x0=10:y0=10: r=1:h=2:b=2:a=16:v=2
2560 a$="statistik demo":gosub450
2600 rem*********************************
2650 x0=10:y0=190:r=1:h=1:b=1:a=08:v=1
2700 t =rnd(-ti)
2750 fori=1to10:y0(i)=rnd(8)*160+30:next:rem statistikwerte
2800 fory=190to30step-16:(NULL) 0,8,y:(NULL)0,318,y:next:(NULL) 0,12,110:(NULL)0,315,110
2850 forx=42to312step28:(NULL)0,x,110:(NULL)0,x+1,110: :next
2900 (NULL) 0,190 :(NULL)0,30:rem 0=horiz
2950 (NULL) 1,8 :(NULL)1,318:rem 1=vertik.
2960 x0=296:y0=106:r=1:h=1:b=1:a=08:v=1:zm=1:a$=" [146]":gosub450
2970 zm=0:a$="50%":gosub450
2980 a$="100%":x0=288:y0=22:gosub450
2990 z=0
3000 forx1=40to319step28:z=z+1:x0=x1-22:y0=y0(z):y1=190:yp%=100*(190.5-y0)/160
3050 gosub350
3100 a$=str$(yp%):a$=right$(a$,len(a$)-1) :y0=y1+2:x0=x0+2:
3150 :ifyp%<10thenx0=x0+8
3200 gosub450:next
3250 ri=0:sw=3
3300 gosub300:(NULL)
3350 z=0
3400 forx1=40to319step28:z=z+1:x0=x1-22:y0=y0(z):y1=190:yp%=100*(190-y0)/160
3450 gosub400:next
3500 ri=1:sw=2:gosub300
3600 z=0
3650 forx1=40to319step28:z=z+1:x0=x1-22:y0=y0(z):y1=190
3700 gosub400:next:gosub300
3710 z=0:ri=1:sw=2
3715 forx1=40to319step28:zm=2:z=z+1:x0=x1-22:y0=y0(z):y1=189
3720 gosub400:zm=0:gosub350:next
3750 gosub300:return
3800 rem******************************
3810 print"[147]":(NULL)0:(NULL)
3820 print" demonstration discreen/gtscreen[146]"
3825 print" anleitung: ";le$
3830 print"editiermodus menuezeile: gruen[156]"
3832 print"<joystick fire>[146] : punkt setzen/loeschen"
3833 print"<return>[146] : ---------''----------"
3834 print"<space>[146] : setz-/ loeschmodus"
3835 print"( gesetzter punkt erscheint als [209] )"
3836 print"[159]auswahl[156]:cursor auf gewuenschte funktion in menuezeile & <return>[146]"
3837 print"[154]gtscreen[156][146]: editierter ausschnitt wird in hires bild eingefuegt, ";
3838 print"lokalisiert durch <return>[146]/<fire>[146] dann in menuezeile aus-wahl ";
3839 print"<return>[146]".
3840 print"[158]hiresausschnitt holen : menue-zeile:gelb[156]"
3841 print"ausschnittort <return>[146]/<fire>[146] dann in menuezeile auswahl ";
3842 print"<discreen>[146] <return>[146]."
3843 print"zm : zeichenmodus: setz/loesch/inv"
3844 print"<taste>[146][145]":gete$:ife$=""thenpoke646,f1:f1=f1+1+15*(f1>=14):goto3844
3848 rem*******************************
3849 rem****** discreen/gtscreen *****
3850 print"[147][156]"
3860 se$(0)="reset ":se$(1)="set "
3900 wc$=chr$(13):zm=0:r=1:b=1:h=1:v=00:a=8:x0=00:y0=00:a$="di/gt":gosub450
3950 zm=2:x0=00:y0=8:h=2:a=6:a$="screen":gosub450
4000 zm=1:y1%=8:y2%=25:forx1=0to48step6:x1%=x1:x2%=x1:gosub500:next
4050 (NULL)00,00
4100 zx=0:zy=24:gosub550
4150 print" / gtscreen / inv / menue /[156]";
4200 fori=704to704+63:pokei,0:next:k=0:fori=39915to39929:poke704+k,peek(i):k=k+1:next
4350 :
4400 (NULL)1:fl=51268:bc(0)=32:bc(1)=81:k=0
4450 kk=kk+1
4500 k=k-(k=0)+(k=1):(NULL):zx=0:zy=24:gosub550:printse$(k);
4600 rem*******************************
4650 pokefl,0:(NULL)2:poke51265,8:x1%=x%/8:y1%=y%/8:fi=peek(fl)
4700 ifpeek(203)=60then4450
4720 getw$
4750 ify1%<24then5050
4800 ifx1%>32and(fiorw$=wc$)thenfi=0:return
4850 ifx1%<10and(fiorw$=wc$)thenfi=0:goto4450
4900 ifx1%>10andx1%<20and(fiorw$=wc$)thenfi=0:goto5550
4950 ifx1%>20andx1%<30and(fiorw$=wc$)thenfi=0:(NULL):gosub5300
5000 goto4650
5050 p=x1%+40*y1%:pe=peek(1024+p)
5150 iffiorpeek(203)=1thenpoke(1024+p),bc(k):poke(55296+p),4
5200 goto4650
5250 rem*****"invers********************
5300 [217]1:[204]:[227]0,0,0:[153]"wait" : [224]100,0:[233]
5320 [224]0,0:[233]:[217]1:[142]
5449 [143]*******************************
5450 [143]***** gtscreen ***************
5500 [209]
5550 [237] 0,189:[208]1
5600 zx[178]0:zy[178]24:[141]550:[153]"sys/ zm / gtscreen/ discreen/ menue waitclr";
5650 zx[178]5:[141]550:[153]z1;:[151]51265,8
5700 [151]fl,0:[208]2:fi[178][194](fl)
5720 [161]w$
5750 [139]fi[176]w$[178]wc$[167][141]6550
5800 [139]y%[179]190[176](fi[178]0[175]w$[179][177]wc$)[167]5700
5850 [209]:x1%[178]x%[173]8:y1%[178]y%[173]8
5900 :
5950 [139]x1%[177]0[175]x1%[179]10[167]z1[178]z1[170]1[170]3[172](z1[177][178]2):zx[178]5:zy[178]24:[141]550:[153]z1;
6000 :
6050 [139]x1%[177]10[175]x1%[179]20[175]rb[167]zm[178]2:[141]350:[227]z1,x0,y0:rb[178]0
6100 :
6150 [139]x1%[177]20[175]x1%[179]30[175]rb[167]zm[178]2:[141]350:[237]:[224]x0,y0:rb[178]0:[137]4100
6200 :
6250 [139]x1%[177]30[175]x1%[179]40[167][137]7650
6300 :
6400 [151]51265,8:[143] step 8
6450 [137]5700
6500 :
6550 [139]x%[177]279[176]y%[177]175[167][142]
6600 [139]rb[167]zm[178]2:[141]350:rb[178]0
6650 [139]rb[178]0[167]zm[178]2:x0[178]x%:y0[178]y%:x1[178]x%[170]40:y1[178]y%[170]24:[141]350:rb[178]1
6700 [151]51265,8
6750 [142]
6800 [143]****************************
6849 [143]***** enlarg **********
6850 [204]:[205]4,0:[237]0,190:zx[178]0:zy[178]24:[141]550
6900 [153]"demo enlarg :<taste>";:[141]300
6910 [141]6950:
6920 [129]i[178]0[164]2:[221]i:[141]300:[204]:[217]1:[130]
6930 [206]0:[209]255:[142]
6949 [143]----------" muster -----------
6950 ax=2:ay=2:rem schrittweite
6955 y0=peek(162)/2.5:zm=2:yz=1
7000 (NULL):(NULL)1
7050 forx0=0to158stepax:y0=y0+ay*yz:ify0>90thenyz=-1:y0=y0+ay*yz:(NULL)
7100 ify0<0thenyz=1:y0=y0+ay*yz:(NULL)
7150 x1=158-x0:y1=90-y0:y1=y1*(1+(y0>90)) :gosub350:next
7200 ifax<3then(NULL):ax=ax+2:goto7050
7250 (NULL)0,0:(NULL)1:(NULL):(NULL)1:(NULL):(NULL):(NULL)1:(NULL)4,0:return
7251 rem-------------------------------
7398 rem*******************************
7399 rem**********" mirror **********
7400 [204]:[205]4,0
7460 zm[178]0:r[178]1:a[178]8:b[178]1:h[178]2:v[178]0:x0[178]25:y0[178]172:a$[178]"demo mirror ":[141]450
7462 x0[178]150:y0[178]100:r[178]4:[141]450
7465 r[178]1:b[178]6:h[178]6:x0[178]25:y0[178]120:a$[178]"_":[141]450
7466 [211]0,189:[211]1,159
7470 x0[178]250:y0[178]120:a$[178]"^":[141]450
7480 ax[178]4:ay[178]4:[141]6955
7500 [217]:[204]:[218]1:sz[178]40
7510 [237]0,190
7520 [129]hv[178]0[164]1:[129]of[178]0[164]3:[129]sz[178]0[164]40[169]10
7522 [237]:[206]1:[141]520:[141]7680:[237]0,190
7525 [129]uu[178]0[164]1000:[130]
7530 [204]:[218]1:[161]w$:[139]w$[178]"*"[167]hv[178]1:of[178]3:sz[178]40:[209]:[209]
7532 [130]:[130]:[130]
7535 [141]550:[153]"<taste> menue"le$;:[141]300:
7649 [143]------------------------
7650 [237]:[209]255:[142]
7651 [143]------------------------
7680 zx[178]0:zy[178]24:[141]550:[153]le$le$:[141]550
7685 [153]"mirror "hv" ,"sz" ,"of" open<*>clrwait stop";:[142]
7699 [143] ********************************
7700 [131] grafik 2000, (c) f.brendel
7750 [131] modified by,dr.h.domes
7800 [131] grafik 2001,made in austria
7850 [131] 5,5,314,70, 5,75, 314,194
50010 :
50020 :
50030 :
50040 [151]53280,0:[151]53281,0:[153]"clr"
50050 [143]------------------------10.12.85-
50060 [143] mu$(...)auswahlbegriffe
50070 [143] tl$( ) titel fuer menueseite
50080 [143] mi(block#) index beg.block in mu$
50090 [143] "mb=maxim blockanzahl
50100 rem "ni= eingabezahl
50110 [143] "nu=untergrenze, no=obergrenze
50120 rem "data struktur:
50130 [143] "^^" blockbeginn
50140 [143] "__" datenendenn
50150 [143] "*@" zahleneingabe,nu,no
50160 [143]--------------------------------
50170 [134]mu$(80),mi(20),tl$(20)
50180 di$(0)[178]"ononon":di$(1)[178]"":di$(2)[178]"on": di$(3)[178]""
50190 le$[178]" "
50200 [143]--------------------------------
50210 i[178]0:zi[178]1:[143]einlesen
50215 [135]mu$:[139]mu$[179][177]"!!"[167]50215
50220 [135]mu$
50230 [139]mu$[178]"^^"[167][135]tl$(zi):mi(zi)[178]i: zi[178]zi[170]1:[137]50220
50240 [139]mu$[179][177]"__"[167]mu$(i)[178]mu$:i[178]i[170]1:[137]50220
50250 mi(zi)[178]i:mb[178]zi[171]1:[142]
50260 [143]--------------------------------
50270 :
50300 ib[178]mi(bl):ie[178]mi(bl[170]1)[171]1
50310 [153]"load":[151]198,0:[141]50340
50320 [209]:[209]255: [142]
50330 [143]--------------------------------
50340 [153]""tl$(bl)di$(3)
50350 [139]mu$(ib)[178]"*@"[167]50480
50360 [129]i[178]ib[164]ie:[153]mu$(i):[153]:[130]
50370 [153]""tl$(bl)di$(3):i[178]ib:
50380 [153]""mu$(i)
50390 [161]w$:[139]w$[179][177]"on"[175]w$[179][177]""[175]w$[179][177][199](13)[167]50390
50400 li[178]i:[143] letzter i wert
50410 [139]w$[178][199](13)[167]i[178]i[171]ib[170]1:[142]
50420 [139]w$[178]""[167]i[178]i[170]1:zi[178]1:[139]i[177]ie[167]i[178]ie:zi[178]2
50430 [139]w$[178]"on"[167]i[178]i[171]1:zi[178]0:[139]i[179]ib[167]i[178]ib:zi[178]2
50440 [153]"on"mu$(li):[153]di$(zi)""mu$(i)
50450 [137]50390
50460 [143]================================
50470 [143]================================
50480 nu[178][197](mu$(ib[170]1)):no[178][197](mu$(ib[170]2))
50490 [129]i[178]0[164]2:[153]""le$:[130]:[153]"onononclr"
50500 [153][163]5)" cmdcmdcmdcmd"ni"on":[151]646,c:c[178]4
50510 [161]w$:[139]w$[178]""[167]c[178]5:ni[178]ni[170]1:[139]no[179]ni[167]ni[178]nu
50520 [139]w$[178]"cmd"[167]c[178]2:ni[178]ni[171]1:[139]ni[179]nu[167]ni[178]no
50530 [139]w$[178]""[167]c[178]2:ni[178]ni[171]10:[139]ni[179]nu[167]ni[178]no
50540 [139]w$[178]"on"[167]c[178]5:ni[178]ni[170]10:[139]no[179]ni[167]ni[178]nu
50550 [139]w$[178][199](13)[167][142]:[143]=======
50560 [137]50500
50570 [143]================================
50580 [131] "!!":[143] startflag
50590 [131] "^^",demonstration > grafik 2001 <
50600 [131] recht,block,rorecht,enlarg,mirror,sprplot,gtscreen,discreen
50610 [131] "openendeclr"
50640 [131] "__":[143] endflag
51999 [143]****" sprplot **********
52000 (NULL)1:(NULL)
52020 fori=1to3:n$="testsprite"+right$(str$(i),1):(NULL)i,n$,8:next
52050 fory=0to150step42:forx=0to280step72
52080 fori=1to3:(NULL)i,0,x+24*(i-1),y:next:next:next
52150 fori=4to6:n$="testsprite"+right$(str$(i),1):(NULL)i,n$,8:next
52180 fory=21to171step42:forx=0to280step72:fori=4to6
52200 (NULL)i,0,x+24*(i-4),y:next:next :next:gosub300
52300 p1=1:forii=0to40:rn=rnd(-ti):x=rnd(8)*245:y=rnd(8)*145
52303 (NULL)p1,00:p1=p1+1+15*(p1>14)
52305 (NULL)1,x,y,x+71,y+41:(NULL)0,x,y,x+71,y+41
52310 fori=1to3:(NULL)i,0,x+(i-1)*24,y:next
52315 fori=4to6:(NULL)i,0,x+(i-4)*24,y+21:next
52320 next:(NULL):(NULL)4,0:(NULL)255:return
54999 rem **** "rorecht" **************
55000 (NULL)1:(NULL)
55010 l1=50:l2=10:y1=50:y2=145:w1=0:w2=360:x2=310
55110 forx1=0to300step10:w1=w1+9:wi=w1:x0=x1:y0=y1:gosub360
55120 w2=w2-9:wi=w2:x2=x2-10:x0=x2:y0=y2:gosub360
55210 next:(NULL)255:gosub300:(NULL)0:return