home *** CD-ROM | disk | FTP | other *** search
- 10 gosub10000:gosub9000:t1=ti:goto30
- 20 pc=pc+1:pb=peek(pc):return
- 30 la=peek(pc)+peek(pc+1)*256
- 40 ifla=0thenpc=pc+2:t2=ti:goto1000
- 50 pc=pc+4:nl=nl+1:pb=peek(pc)
- 55 ln=peek(pc-2)+peek(pc-1)*256:print"";ln
- 60 ifpb=0thenpc=pc+1:goto30
- 70 ifpb=34goto150
- 90 ifpb<128goto200
- 100 pb=pband127:tk(pb)=tk(pb)+1:nt=nt+1
- 110 ifpb=3goto300
- 115 ifpb=15goto350
- 120 gosub20:goto60
- 130 :
- 150 gosub20:ifpb=34goto200
- 160 ifpb=0goto60
- 170 goto150
- 200 ifpb>64andpb<91thengosub400:goto60
- 210 gosub20:goto60
- 220 :
- 300 gosub20:ifpb=0goto60
- 310 ifpb=58thengosub20:goto60
- 320 goto300
- 330 :
- 350 gosub20:ifpb=0goto60
- 360 goto350
- 400 x=0:vr$="":vr$=chr$(pb)
- 410 gosub20
- 420 ifpb>64andpb<91thenvr$=vr$+chr$(pb):goto410
- 425 ifpb>47andpb<58thenvr$=vr$+chr$(pb):goto410
- 430 ifpb=36orpb=37thenvr$=vr$+chr$(pb):gosub20
- 440 ifvn$(x)=""thenvn$(x)=vr$:va(x)=va(x)+1:nv=nv+1:return
- 450 ifvn$(x)=vr$thenva(x)=va(x)+1:return
- 460 x=x+1:ifx<50goto440
- 470 return
- 1000 print"[147] -- program statistics --"
- 1005 print" program name = ";nm$
- 1010 print" program size =";pc-2049
- 1020 print" no of lines =";nl
- 1030 print" no of commands =";nt
- 1035 print" no of variables =";nv
- 1040 gosub1150
- 1060 x=0:print"[147]- commands -"
- 1070 fori=0to127:iftk(i)=0andi>74thennext:goto1120
- 1075 iftk(i)=0thengosub3000:next:goto1120
- 1080 x=x+1:ifx<23goto1110
- 1100 gosub1150:x=0:print"[147]";
- 1110 gosub3000:gosub3100:next
- 1120 gosub1150:goto1200
- 1140 :
- 1150 ifpa=1thenreturn
- 1160 print" use any key to continue";
- 1170 getr$:ifr$=""goto1170
- 1180 return
- 1200 :
- 1210 print"[147]- variables -":x=0:j=0
- 1220 ifx>49goto1300
- 1225 ifvn$(x)=""goto1300
- 1230 pb=len(vn$(x)):ifpb>3thenpb=3
- 1240 onpbgoto1250,1260,1270
- 1250 printvn$(x);" =";:goto1280
- 1260 printvn$(x);" =";:goto1280
- 1270 printvn$(x);"=";
- 1280 printva(x)
- 1290 x=x+1:j=j+1:ifj<22goto1220
- 1294 j=0:gosub1150
- 1298 print"[147]";:goto1220
- 1300 print" r=re-display, x=end, p=printer";:close4:pa=0
- 1310 getr$:ifr$=""goto1310
- 1320 ifr$="r"goto1510
- 1330 ifr$="x"goto2000
- 1340 ifr$="p"thenclose4:goto1500
- 1350 goto1310
- 1500 open4,4:cmd4:pa=1
- 1510 x=0:tn=41118:goto1000
- 1990 :
- 2000 print"[147]time taken=";(t2-t1)/60:end
- 2990 :
- 3000 tn$="":pb=peek(tn)
- 3010 ifpb>127thenpb=pband127:tn$=tn$+chr$(pb):tn=tn+1:return
- 3020 tn$=tn$+chr$(pb):tn=tn+1:pb=peek(tn):goto3010
- 3030 :
- 3100 j=len(tn$):j=7-j:printtn$spc(j)"=";tk(i):return
- 9000 :
- 9020 rem load basic program at 2049
- 9130 :
- 9140 input"load from disk (y/n)";r$
- 9150 ifr$="n"thende=1:goto9200
- 9160 ifr$="y"thende=8:goto9200
- 9170 goto9140
- 9180 :
- 9200 input"program to be loaded==>";nm$
- 9210 fl=len(nm$)
- 9220 forj=1tofl:poke511+j,asc(mid$(nm$,j,1)):next
- 9230 :
- 9300 poke780,192:sys65424
- 9310 poke780,1:poke781,de:poke782,0
- 9320 sys65466
- 9330 poke780,fl:poke781,0:poke782,2
- 9340 sys65469
- 9350 poke780,0:poke781,1:poke782,8
- 9360 sys65493
- 9370 poke780,0:sys65424
- 9420 :
- 9430 return
- 9440 :
- 10000 pb=0:pc=2049:nb=0:nl=0:la=0:dimtk(127):nt=0:nv=0:x=0:j=0:tn=41118:pa=0
- 10015 dimva(49):dimvn$(49):vr$="":tn$="":r$="":nm$=""
- 10020 print"[147]":return
-