Home » Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF » TAPE3/A/APP\GRAPH
TAPE3/A/APP\GRAPH
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF |
Filename: | TAPE3/A/APP\GRAPH |
Read OK: | ✔ |
File size: | 0617 bytes |
Load address: | FFFF0E00 |
Exec address: | FFFF8023 |
Duplicates
There are 3 duplicate copies of this file in the archive:
- Personal collection » Acorn ADFS disks » Electron » MTF_finished_programs.ADF » TAPE3/A/APP\GRAPH
- Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF » TAPE3/A/APP\GRAPH
- Personal collection » Acorn hard disk » zipped_disks » elk03 » finished/TAPE3/A/APP.GRAPH
- Personal collection » Acorn tapes » Own_Work » box02_tape03a_c15_acorn_maths.wav » APP/GRAPH
File contents
5 min=99999 6 minapp=0 10 @%=&20300 20 MODE 0 30 early=0 40 total=0 45 PROCgraph 50 RESTORE 220 60 DIM consult(30) 70 FOR count=1 TO 30 80 READ consult 90 total=total+consult:consult(count)=consult 100 NEXT count 110 FOR appoint=0 TO 20 STEP 0.05 120 in=0:out=0:doctor=0:patient=0:patient2=0 130 FOR patcount%=1 TO 30 140 consult=consult(patcount%) 150 apptime=appoint*(patcount%-1)-early 160 IF apptime>out THEN newin=apptime:out=newin+consult:in=newin:NEXT patcount%:GOTO 190 170 newin=out:patient=patient+(out-apptime):IF in>apptime THEN patient2=patient2+(out-in) ELSE patient2=patient2+(out-apptime) 180 in=newin:out=newin+consult:NEXT patcount% 190 doctor=out-total 195 PROCplot 196 GOTO 210 200 PRINT TAB(0) INT((appoint*10)+0.5)/10;TAB(10)FNx(doctor);TAB(20)FNx(patient);TAB(31)FNx(patient2);TAB(42)FNx(doctor+patient);TAB(53)FNx(doctor+patient2);TAB(64)FNx(100*((doctor+patient2)/out));"% wasted" 210 NEXT appoint 212 PRINT 'min;" ";minapp 215 END 220 DATA 6,2,5,1,7,16,2,5,4,7,2,7,2,3,4,1,3,6,3,5,4,18,6,3,5,1,4,19,3,5 230 DEF FNx(X):=X+0.0000005 240 DATA 1,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,7,7,7,16,18,19 250 DATA 19,18,16,7,7,7,6,6,6,5,5,5,5,5,4,4,4,4,3,3,3,3,3,2,2,2,2,1,1,1 260 DATA 1,1,1,2,2,2,3,2,3,3,3,4,3,4,5,4,4,5,5,5,5,6,6,6,7,7,7,16,18,19 1000 DEFPROCgraph 1010 MOVE 100,900:DRAW 100,100:DRAW 1100,100 1020 @%=&90A:VDU 5:FOR label=0 TO 20:MOVE (100+50*(label)),99:DRAW (100+50*(label)),90:MOVE(50*(label)-50),70:PRINT label:NEXT label:VDU 4:@%=&20300 1100 ENDPROC 2000 DEFPROCplot 2010 MOVE (100+50*(appoint)),(100+((800/2200)*(doctor*2+patient))):DRAW (100+50*(appoint)),(100+((800/2200)*(doctor*2+patient))) 2015 IF doctor*2+patient<min THEN min=doctor*2+patient:minapp=appoint 2020 ENDPROC
min=99999 minapp=0 @%=&20300 � 0 early=0 ( total=0 - �graph 2 � �d\@ < � consult(30) F � count=1 � 30 P � consult Z/ total=total+consult:consult(count)=consult d � count n � appoint=0 � 20 � 0.05 x- in=0:out=0:doctor=0:patient=0:patient2=0 � � patcount%=1 � 30 � consult=consult(patcount%) �( apptime=appoint*(patcount%-1)-early �P � apptime>out � newin=apptime:out=newin+consult:in=newin:� patcount%:� �t~@ �x newin=out:patient=patient+(out-apptime):� in>apptime � patient2=patient2+(out-in) � patient2=patient2+(out-apptime) �+ in=newin:out=newin+consult:� patcount% � doctor=out-total � �plot � � �dR@ ȯ � �0) �((appoint*10)+0.5)/10;�10)�x(doctor);�20)�x(patient);�31)�x(patient2);�42)�x(doctor+patient);�53)�x(doctor+patient2);�64)�x(100*((doctor+patient2)/out));"% wasted" � � appoint � � 'min;" ";minapp � � �E � 6,2,5,1,7,16,2,5,4,7,2,7,2,3,4,1,3,6,3,5,4,18,6,3,5,1,4,19,3,5 � � �x(X):=X+0.0000005 �E � 1,1,1,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,7,7,7,16,18,19 �E � 19,18,16,7,7,7,6,6,6,5,5,5,5,5,4,4,4,4,3,3,3,3,3,2,2,2,2,1,1,1 E � 1,1,1,2,2,2,3,2,3,3,3,4,3,4,5,4,4,5,5,5,5,6,6,6,7,7,7,16,18,19 � ��graph �# � 100,900:� 100,100:� 1100,100 �} @%=&90A:� 5:� label=0 � 20:� (100+50*(label)),99:� (100+50*(label)),90:�(50*(label)-50),70:� label:� label:� 4:@%=&20300 L � � ��plot �z � (100+50*(appoint)),(100+((800/2200)*(doctor*2+patient))):� (100+50*(appoint)),(100+((800/2200)*(doctor*2+patient))) �A � doctor*2+patient<min � min=doctor*2+patient:minapp=appoint � � �
00000000 0d 00 05 0e 20 6d 69 6e 3d 39 39 39 39 39 0d 00 |.... min=99999..| 00000010 06 0d 20 6d 69 6e 61 70 70 3d 30 0d 00 0a 0e 20 |.. minapp=0.... | 00000020 40 25 3d 26 32 30 33 30 30 0d 00 14 08 20 eb 20 |@%=&20300.... . | 00000030 30 0d 00 1e 0c 20 65 61 72 6c 79 3d 30 0d 00 28 |0.... early=0..(| 00000040 0c 20 74 6f 74 61 6c 3d 30 0d 00 2d 0b 20 f2 67 |. total=0..-. .g| 00000050 72 61 70 68 0d 00 32 0b 20 f7 20 8d 64 5c 40 0d |raph..2. . .d\@.| 00000060 00 3c 12 20 de 20 63 6f 6e 73 75 6c 74 28 33 30 |.<. . consult(30| 00000070 29 0d 00 46 13 20 e3 20 63 6f 75 6e 74 3d 31 20 |)..F. . count=1 | 00000080 b8 20 33 30 0d 00 50 0e 20 f3 20 63 6f 6e 73 75 |. 30..P. . consu| 00000090 6c 74 0d 00 5a 2f 20 74 6f 74 61 6c 3d 74 6f 74 |lt..Z/ total=tot| 000000a0 61 6c 2b 63 6f 6e 73 75 6c 74 3a 63 6f 6e 73 75 |al+consult:consu| 000000b0 6c 74 28 63 6f 75 6e 74 29 3d 63 6f 6e 73 75 6c |lt(count)=consul| 000000c0 74 0d 00 64 0c 20 ed 20 63 6f 75 6e 74 0d 00 6e |t..d. . count..n| 000000d0 1c 20 e3 20 61 70 70 6f 69 6e 74 3d 30 20 b8 20 |. . appoint=0 . | 000000e0 32 30 20 88 20 30 2e 30 35 0d 00 78 2d 20 69 6e |20 . 0.05..x- in| 000000f0 3d 30 3a 6f 75 74 3d 30 3a 64 6f 63 74 6f 72 3d |=0:out=0:doctor=| 00000100 30 3a 70 61 74 69 65 6e 74 3d 30 3a 70 61 74 69 |0:patient=0:pati| 00000110 65 6e 74 32 3d 30 0d 00 82 17 20 e3 20 70 61 74 |ent2=0.... . pat| 00000120 63 6f 75 6e 74 25 3d 31 20 b8 20 33 30 0d 00 8c |count%=1 . 30...| 00000130 1f 20 63 6f 6e 73 75 6c 74 3d 63 6f 6e 73 75 6c |. consult=consul| 00000140 74 28 70 61 74 63 6f 75 6e 74 25 29 0d 00 96 28 |t(patcount%)...(| 00000150 20 61 70 70 74 69 6d 65 3d 61 70 70 6f 69 6e 74 | apptime=appoint| 00000160 2a 28 70 61 74 63 6f 75 6e 74 25 2d 31 29 2d 65 |*(patcount%-1)-e| 00000170 61 72 6c 79 0d 00 a0 50 20 e7 20 61 70 70 74 69 |arly...P . appti| 00000180 6d 65 3e 6f 75 74 20 8c 20 6e 65 77 69 6e 3d 61 |me>out . newin=a| 00000190 70 70 74 69 6d 65 3a 6f 75 74 3d 6e 65 77 69 6e |pptime:out=newin| 000001a0 2b 63 6f 6e 73 75 6c 74 3a 69 6e 3d 6e 65 77 69 |+consult:in=newi| 000001b0 6e 3a ed 20 70 61 74 63 6f 75 6e 74 25 3a e5 20 |n:. patcount%:. | 000001c0 8d 74 7e 40 0d 00 aa 78 20 6e 65 77 69 6e 3d 6f |.t~@...x newin=o| 000001d0 75 74 3a 70 61 74 69 65 6e 74 3d 70 61 74 69 65 |ut:patient=patie| 000001e0 6e 74 2b 28 6f 75 74 2d 61 70 70 74 69 6d 65 29 |nt+(out-apptime)| 000001f0 3a e7 20 69 6e 3e 61 70 70 74 69 6d 65 20 8c 20 |:. in>apptime . | 00000200 70 61 74 69 65 6e 74 32 3d 70 61 74 69 65 6e 74 |patient2=patient| 00000210 32 2b 28 6f 75 74 2d 69 6e 29 20 8b 20 70 61 74 |2+(out-in) . pat| 00000220 69 65 6e 74 32 3d 70 61 74 69 65 6e 74 32 2b 28 |ient2=patient2+(| 00000230 6f 75 74 2d 61 70 70 74 69 6d 65 29 0d 00 b4 2b |out-apptime)...+| 00000240 20 69 6e 3d 6e 65 77 69 6e 3a 6f 75 74 3d 6e 65 | in=newin:out=ne| 00000250 77 69 6e 2b 63 6f 6e 73 75 6c 74 3a ed 20 70 61 |win+consult:. pa| 00000260 74 63 6f 75 6e 74 25 0d 00 be 15 20 64 6f 63 74 |tcount%.... doct| 00000270 6f 72 3d 6f 75 74 2d 74 6f 74 61 6c 0d 00 c3 0a |or=out-total....| 00000280 20 f2 70 6c 6f 74 0d 00 c4 0b 20 e5 20 8d 64 52 | .plot.... . .dR| 00000290 40 0d 00 c8 af 20 f1 20 8a 30 29 20 a8 28 28 61 |@.... . .0) .((a| 000002a0 70 70 6f 69 6e 74 2a 31 30 29 2b 30 2e 35 29 2f |ppoint*10)+0.5)/| 000002b0 31 30 3b 8a 31 30 29 a4 78 28 64 6f 63 74 6f 72 |10;.10).x(doctor| 000002c0 29 3b 8a 32 30 29 a4 78 28 70 61 74 69 65 6e 74 |);.20).x(patient| 000002d0 29 3b 8a 33 31 29 a4 78 28 70 61 74 69 65 6e 74 |);.31).x(patient| 000002e0 32 29 3b 8a 34 32 29 a4 78 28 64 6f 63 74 6f 72 |2);.42).x(doctor| 000002f0 2b 70 61 74 69 65 6e 74 29 3b 8a 35 33 29 a4 78 |+patient);.53).x| 00000300 28 64 6f 63 74 6f 72 2b 70 61 74 69 65 6e 74 32 |(doctor+patient2| 00000310 29 3b 8a 36 34 29 a4 78 28 31 30 30 2a 28 28 64 |);.64).x(100*((d| 00000320 6f 63 74 6f 72 2b 70 61 74 69 65 6e 74 32 29 2f |octor+patient2)/| 00000330 6f 75 74 29 29 3b 22 25 20 77 61 73 74 65 64 22 |out));"% wasted"| 00000340 0d 00 d2 0e 20 ed 20 61 70 70 6f 69 6e 74 0d 00 |.... . appoint..| 00000350 d4 16 20 f1 20 27 6d 69 6e 3b 22 20 22 3b 6d 69 |.. . 'min;" ";mi| 00000360 6e 61 70 70 0d 00 d7 06 20 e0 0d 00 dc 45 20 dc |napp.... ....E .| 00000370 20 36 2c 32 2c 35 2c 31 2c 37 2c 31 36 2c 32 2c | 6,2,5,1,7,16,2,| 00000380 35 2c 34 2c 37 2c 32 2c 37 2c 32 2c 33 2c 34 2c |5,4,7,2,7,2,3,4,| 00000390 31 2c 33 2c 36 2c 33 2c 35 2c 34 2c 31 38 2c 36 |1,3,6,3,5,4,18,6| 000003a0 2c 33 2c 35 2c 31 2c 34 2c 31 39 2c 33 2c 35 0d |,3,5,1,4,19,3,5.| 000003b0 00 e6 19 20 dd 20 a4 78 28 58 29 3a 3d 58 2b 30 |... . .x(X):=X+0| 000003c0 2e 30 30 30 30 30 30 35 0d 00 f0 45 20 dc 20 31 |.0000005...E . 1| 000003d0 2c 31 2c 31 2c 32 2c 32 2c 32 2c 32 2c 33 2c 33 |,1,1,2,2,2,2,3,3| 000003e0 2c 33 2c 33 2c 33 2c 34 2c 34 2c 34 2c 34 2c 35 |,3,3,3,4,4,4,4,5| 000003f0 2c 35 2c 35 2c 35 2c 35 2c 36 2c 36 2c 36 2c 37 |,5,5,5,5,6,6,6,7| 00000400 2c 37 2c 37 2c 31 36 2c 31 38 2c 31 39 0d 00 fa |,7,7,16,18,19...| 00000410 45 20 dc 20 31 39 2c 31 38 2c 31 36 2c 37 2c 37 |E . 19,18,16,7,7| 00000420 2c 37 2c 36 2c 36 2c 36 2c 35 2c 35 2c 35 2c 35 |,7,6,6,6,5,5,5,5| 00000430 2c 35 2c 34 2c 34 2c 34 2c 34 2c 33 2c 33 2c 33 |,5,4,4,4,4,3,3,3| 00000440 2c 33 2c 33 2c 32 2c 32 2c 32 2c 32 2c 31 2c 31 |,3,3,2,2,2,2,1,1| 00000450 2c 31 0d 01 04 45 20 dc 20 31 2c 31 2c 31 2c 32 |,1...E . 1,1,1,2| 00000460 2c 32 2c 32 2c 33 2c 32 2c 33 2c 33 2c 33 2c 34 |,2,2,3,2,3,3,3,4| 00000470 2c 33 2c 34 2c 35 2c 34 2c 34 2c 35 2c 35 2c 35 |,3,4,5,4,4,5,5,5| 00000480 2c 35 2c 36 2c 36 2c 36 2c 37 2c 37 2c 37 2c 31 |,5,6,6,6,7,7,7,1| 00000490 36 2c 31 38 2c 31 39 0d 03 e8 0c 20 dd f2 67 72 |6,18,19.... ..gr| 000004a0 61 70 68 0d 03 f2 23 20 ec 20 31 30 30 2c 39 30 |aph...# . 100,90| 000004b0 30 3a df 20 31 30 30 2c 31 30 30 3a df 20 31 31 |0:. 100,100:. 11| 000004c0 30 30 2c 31 30 30 0d 03 fc 7d 20 40 25 3d 26 39 |00,100...} @%=&9| 000004d0 30 41 3a ef 20 35 3a e3 20 6c 61 62 65 6c 3d 30 |0A:. 5:. label=0| 000004e0 20 b8 20 32 30 3a ec 20 28 31 30 30 2b 35 30 2a | . 20:. (100+50*| 000004f0 28 6c 61 62 65 6c 29 29 2c 39 39 3a df 20 28 31 |(label)),99:. (1| 00000500 30 30 2b 35 30 2a 28 6c 61 62 65 6c 29 29 2c 39 |00+50*(label)),9| 00000510 30 3a ec 28 35 30 2a 28 6c 61 62 65 6c 29 2d 35 |0:.(50*(label)-5| 00000520 30 29 2c 37 30 3a f1 20 6c 61 62 65 6c 3a ed 20 |0),70:. label:. | 00000530 6c 61 62 65 6c 3a ef 20 34 3a 40 25 3d 26 32 30 |label:. 4:@%=&20| 00000540 33 30 30 0d 04 4c 06 20 e1 0d 07 d0 0b 20 dd f2 |300..L. ..... ..| 00000550 70 6c 6f 74 0d 07 da 7a 20 ec 20 28 31 30 30 2b |plot...z . (100+| 00000560 35 30 2a 28 61 70 70 6f 69 6e 74 29 29 2c 28 31 |50*(appoint)),(1| 00000570 30 30 2b 28 28 38 30 30 2f 32 32 30 30 29 2a 28 |00+((800/2200)*(| 00000580 64 6f 63 74 6f 72 2a 32 2b 70 61 74 69 65 6e 74 |doctor*2+patient| 00000590 29 29 29 3a df 20 28 31 30 30 2b 35 30 2a 28 61 |))):. (100+50*(a| 000005a0 70 70 6f 69 6e 74 29 29 2c 28 31 30 30 2b 28 28 |ppoint)),(100+((| 000005b0 38 30 30 2f 32 32 30 30 29 2a 28 64 6f 63 74 6f |800/2200)*(docto| 000005c0 72 2a 32 2b 70 61 74 69 65 6e 74 29 29 29 0d 07 |r*2+patient)))..| 000005d0 df 41 20 e7 20 64 6f 63 74 6f 72 2a 32 2b 70 61 |.A . doctor*2+pa| 000005e0 74 69 65 6e 74 3c 6d 69 6e 20 8c 20 6d 69 6e 3d |tient<min . min=| 000005f0 64 6f 63 74 6f 72 2a 32 2b 70 61 74 69 65 6e 74 |doctor*2+patient| 00000600 3a 6d 69 6e 61 70 70 3d 61 70 70 6f 69 6e 74 0d |:minapp=appoint.| 00000610 07 e4 06 20 e1 0d ff |... ...| 00000617