Home » Personal collection » Commodore disks » disk50a2_progs1.d64 » perimeter

perimeter

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 » Commodore disks » disk50a2_progs1.d64
Filename: perimeter
Read OK:
File size: 01D6 bytes
Load address: 0801
Exec address: 0000
File contents
    10 REM WETTED PERIMETER CALCULATION
    20 :
    30 D=0:P=0:A=0:CA=0:TD=0
    40 INPUT"MEASUREMENT INTERVALS";MI
    50 A=A+MI:PRINT:PRINT"PERIMETER=";P:PRINT"AREA=";CA
    60 PRINT"HYDRAULIC RADIUS=";HR:PRINT"DEPTH AT";A;:READ DR:PRINT"=";DR
    70 CA=2*(TD/((A+MI)/MI))+A:P=P+SQR(MI^2+(DR-D)^2):D=DR:TD=TD+DR:HR=CA/P:GOTO50
    80 :
   100 DATA100,107,110,120,126,136,144,150,157,170,170,194,187,197,210,220,215,216
   110 DATA223,249,255,263,254,253,264,255,228,250,229,221,199,210,200,192,181,184
   120 DATA179,148,174,131,142,121,84,72,0

$
� WETTED PERIMETER CALCULATION*:DD�0:P�0:A�0:CA�0:TD�0d(�"MEASUREMENT INTERVALS";MI�2A�A�MI:�:�"PERIMETER=";P:�"AREA=";CA�<�"HYDRAULIC RADIUS=";HR:�"DEPTH AT";A;:� DR:�"=";DR	FCA�2�(TD�((A�MI)�MI))�A:P�P��(MI�2�(DR�D)�2):D�DR:TD�TD�DR:HR�CA�P:�50	P:c	d�100,107,110,120,126,136,144,150,157,170,170,194,187,197,210,220,215,216�	n�223,249,255,263,254,253,264,255,228,250,229,221,199,210,200,192,181,184�	x�179,148,174,131,142,121,84,72,0
$HJ@. wetted perimeter calculation@*HT@:@dH.@d.0:p.0:a.0:ca.0:td.0@DH(@."measurement intervals";mi@.H2@a.a.mi:.:."perimeter=";p:."area=";ca@.H<@."hydraulic radius=";hr:."depth at";a;:. dr:."=";dr@PIf@ca.2.(td.((a.mi).mi)).a:p.p..(mi.2.(dr.d).2):d.dr:td.td.dr:hr.ca.p:.50@VIp@:@CID@.100,107,110,120,126,136,144,150,157,170,170,194,187,197,210,220,215,216@.IN@.223,249,255,263,254,253,264,255,228,250,229,221,199,210,200,192,181,184@.IX@.179,148,174,131,142,121,84,72,0@@@
00000000  24 08 0a 00 8f 20 57 45  54 54 45 44 20 50 45 52  |$.... WETTED PER|
00000010  49 4d 45 54 45 52 20 43  41 4c 43 55 4c 41 54 49  |IMETER CALCULATI|
00000020  4f 4e 00 2a 08 14 00 3a  00 44 08 1e 00 44 b2 30  |ON.*...:.D...D.0|
00000030  3a 50 b2 30 3a 41 b2 30  3a 43 41 b2 30 3a 54 44  |:P.0:A.0:CA.0:TD|
00000040  b2 30 00 64 08 28 00 85  22 4d 45 41 53 55 52 45  |.0.d.(.."MEASURE|
00000050  4d 45 4e 54 20 49 4e 54  45 52 56 41 4c 53 22 3b  |MENT INTERVALS";|
00000060  4d 49 00 8d 08 32 00 41  b2 41 aa 4d 49 3a 99 3a  |MI...2.A.A.MI:.:|
00000070  99 22 50 45 52 49 4d 45  54 45 52 3d 22 3b 50 3a  |."PERIMETER=";P:|
00000080  99 22 41 52 45 41 3d 22  3b 43 41 00 c5 08 3c 00  |."AREA=";CA...<.|
00000090  99 22 48 59 44 52 41 55  4c 49 43 20 52 41 44 49  |."HYDRAULIC RADI|
000000a0  55 53 3d 22 3b 48 52 3a  99 22 44 45 50 54 48 20  |US=";HR:."DEPTH |
000000b0  41 54 22 3b 41 3b 3a 87  20 44 52 3a 99 22 3d 22  |AT";A;:. DR:."="|
000000c0  3b 44 52 00 10 09 46 00  43 41 b2 32 ac 28 54 44  |;DR...F.CA.2.(TD|
000000d0  ad 28 28 41 aa 4d 49 29  ad 4d 49 29 29 aa 41 3a  |.((A.MI).MI)).A:|
000000e0  50 b2 50 aa ba 28 4d 49  ae 32 aa 28 44 52 ab 44  |P.P..(MI.2.(DR.D|
000000f0  29 ae 32 29 3a 44 b2 44  52 3a 54 44 b2 54 44 aa  |).2):D.DR:TD.TD.|
00000100  44 52 3a 48 52 b2 43 41  ad 50 3a 89 35 30 00 16  |DR:HR.CA.P:.50..|
00000110  09 50 00 3a 00 63 09 64  00 83 31 30 30 2c 31 30  |.P.:.c.d..100,10|
00000120  37 2c 31 31 30 2c 31 32  30 2c 31 32 36 2c 31 33  |7,110,120,126,13|
00000130  36 2c 31 34 34 2c 31 35  30 2c 31 35 37 2c 31 37  |6,144,150,157,17|
00000140  30 2c 31 37 30 2c 31 39  34 2c 31 38 37 2c 31 39  |0,170,194,187,19|
00000150  37 2c 32 31 30 2c 32 32  30 2c 32 31 35 2c 32 31  |7,210,220,215,21|
00000160  36 00 b0 09 6e 00 83 32  32 33 2c 32 34 39 2c 32  |6...n..223,249,2|
00000170  35 35 2c 32 36 33 2c 32  35 34 2c 32 35 33 2c 32  |55,263,254,253,2|
00000180  36 34 2c 32 35 35 2c 32  32 38 2c 32 35 30 2c 32  |64,255,228,250,2|
00000190  32 39 2c 32 32 31 2c 31  39 39 2c 32 31 30 2c 32  |29,221,199,210,2|
000001a0  30 30 2c 31 39 32 2c 31  38 31 2c 31 38 34 00 d5  |00,192,181,184..|
000001b0  09 78 00 83 31 37 39 2c  31 34 38 2c 31 37 34 2c  |.x..179,148,174,|
000001c0  31 33 31 2c 31 34 32 2c  31 32 31 2c 38 34 2c 37  |131,142,121,84,7|
000001d0  32 2c 30 00 00 00                                 |2,0...|
000001d6