home *** CD-ROM | disk | FTP | other *** search
- 100 rem bar graph (interactive data entry)
- 104 printchr$(14)"[144]":poke53280,5:poke53281,1
- 105 print"[147] [212]his program requires a 1520 [208]rinter/"
- 106 print"[208]lotter or similar device. "
- 107 print:print"[196]o you have this type of device?";
- 108 poke198,0:wait198,1:getk$:ifk$<>"y"andk$<>"n"then108
- 109 printk$:ifk$="n"then63000
- 110 open4,6,0 :rem print ascii data
- 120 open1,6,1 :rem plot x,y data
- 130 open2,6,2 :rem color
- 140 open3,6,3 :rem character size
- 145 print#4:print#4:print#4,"bar chart":print#4
- 147 print#4:print#4:print#4:print#4:print#4:print#4:print#4
- 150 gosub 980 :rem main title
- 170 c=1:gosub950 :rem sub title
- 180 print#1,"m";0,-360
- 190 print#4
- 200 print#1,"m";35,0 :rem pen to 35,0
- 210 print#1,"d";35,500 :rem draws y axis
- 215 print#1,"d";35,-200
- 220 print#1,"h"
- 230 print#1,"m";35,0
- 240 print#1,"d";500,0 :rem draws x axis
- 250 fori=-200to500step25 :rem ticks marks
- 260 print#1,"m";30,i
- 270 print#1,"d";35,i
- 280 next i
- 290 :
- 300 for i=1to l
- 310 c=i :gosub950
- 320 h=a(i)*5:gosub590
- 330 nexti
- 340 :
- 350 for i=1 to l
- 360 c=i :gosub950
- 370 h=a(i)*5:gosub670
- 380 nexti
- 390 :
- 400 print#1,"h"
- 410 print#4
- 420 :
- 430 for i=1 to l
- 440 c=i:s=1:gosub950
- 450 x=0:y=0:gosub800
- 460 nexti
- 470 :
- 480 a$=t$
- 490 c=3:s=2 :gosub950
- 500 x=80:y=540 :gosub890
- 510 a$=s$
- 520 c=2:s=1 :gosub950
- 530 x=90:y=510 :gosub890
- 540 :
- 550 print#1,"h":print#4:print#4:print#4
- 553 print#4:print#4:print#4:print#4:print#4
- 554 gosub1105
- 555 open7,6,7:print#7:rem reset plotter
- 560 close4:close1:close2:close3:close7
- 570 end
- 580 :
- 590 rem==write box==
- 600 x(i)=(i-1)*36*2+36:w=36
- 610 print#1,"m";x(i),0
- 620 print#1,"d";x(i),h
- 630 print#1,"d";x(i)+w,h
- 640 print#1,"d";x(i)+w,0
- 650 return
- 660 :
- 670 rem==fill box==
- 680 x(i)=(i-1)*36*2+36:w=36
- 690 print#1,"m";x(i),0
- 692 if h=>0then700
- 694 if h<0then735
- 700 for j=0to h step2
- 705 print#1,"d";x(i)+w,j
- 710 print#1,"d";x(i)+w,j+1
- 715 if j+1>h then 735
- 720 print#1,"d";x(i),j+1
- 725 print#1,"d";x(i),j+2
- 730 next j
- 735 for j=0toh step -2
- 740 print#1,"d";x(i)+w,j
- 745 print#1,"d";x(i)+w,j-1
- 750 if j-1<h then 770
- 755 print#1,"d";x(i),j-1
- 760 print#1,"d";x(i),j-2
- 765 next j
- 770 return
- 780 :
- 790 rem==character y==
- 800 print#1,"m";x,y:print#4
- 810 ss=(2^s)*10
- 820 for m=1 to len(a$)
- 830 print#1,"m";x(i)+9,ss/5
- 840 print#4,mid$(a$,m,1)
- 850 next m
- 860 print#1,"m";0,ss*4/5*len(a$)+ss*2+y:print#4
- 870 return
- 880 :
- 890 rem==character x==
- 900 print#1,"m";x,y
- 920 print#4,a$
- 930 print#1,"m";x,-y+40*s:print#4:return
- 940 :
- 950 rem==color,size==
- 960 print#2,c:print#3,s:return
- 970 :
- 980 print chr$(147)
- 990 input"enter main title";t$
- 1000 input"enter sub title";s$
- 1010 input"enter number of data points 1-6";l
- 1020 if l<1 or l>6 then goto 1010
- 1030 fori=1tol
- 1040 print" ":print"data point",i
- 1050 input"enter name 1-6 chars";a$(i)
- 1055 if len(a$(i))>6 then goto1050
- 1060 input"enter size -40-40";a(i)
- 1070 if a(i)<-40 or a(i)>40 then goto1060
- 1080 next i
- 1090 return
- 1100 :
- 1105 print#2,2
- 1110 print#4,"data points....."
- 1120 for i=1 to l
- 1130 print#4,a$(i),a(i)
- 1140 nexti
- 1150 print#4:print#4:print#4
- 1160 print#4:print#4:print#4
- 1170 return
- 63000 rem connect back to l.s.
- 63001 print"[147] [211]orry, this won't work for you."
- 63002 print"load"chr$(34)"payload"chr$(34)",8":print"run"
- 63004 poke198,0:poke631,13:poke632,13:poke198,2:end
-