Home » Archimedes archive » Zipped Apps » PipeDream » Custom/CF_sheets/c_GCD

Custom/CF_sheets/c_GCD

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 » Archimedes archive » Zipped Apps » PipeDream
Filename: Custom/CF_sheets/c_GCD
Read OK:
File size: 01AF bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
%OP%FX
%OP%FY
%OP%FS
%OP%NDa,1
%OP%NDb,0
%OP%WC310,1576,364,820,0,0,0,0
%OP%VS3.80 (11-Oct-91), Mrjc, R9200 7500 3900 8299 
%CO:A,50,72%%V%%L%function("GCD","num_1:number","num_2:number")
%V%%L%set_name("a",@num_1)
%V%%L%set_name("b",@num_2)
%V%%L%repeat
%V%%L%set_name("a",mod(a,b))
%V%%L%if(a=0,result(b),)
%V%%L%set_name("b",mod(b,a))
%V%%L%until(b=0)
%V%%L%result(a)
%CO:B,12,60%%CO:C,12,48%%CO:D,12,36%%CO:E,12,24%%CO:F,12,12%
00000000  25 4f 50 25 46 58 0a 25  4f 50 25 46 59 0a 25 4f  |%OP%FX.%OP%FY.%O|
00000010  50 25 46 53 0a 25 4f 50  25 4e 44 61 2c 31 0a 25  |P%FS.%OP%NDa,1.%|
00000020  4f 50 25 4e 44 62 2c 30  0a 25 4f 50 25 57 43 33  |OP%NDb,0.%OP%WC3|
00000030  31 30 2c 31 35 37 36 2c  33 36 34 2c 38 32 30 2c  |10,1576,364,820,|
00000040  30 2c 30 2c 30 2c 30 0a  25 4f 50 25 56 53 33 2e  |0,0,0,0.%OP%VS3.|
00000050  38 30 20 28 31 31 2d 4f  63 74 2d 39 31 29 2c 20  |80 (11-Oct-91), |
00000060  4d 72 6a 63 2c 20 52 39  32 30 30 20 37 35 30 30  |Mrjc, R9200 7500|
00000070  20 33 39 30 30 20 38 32  39 39 20 0a 25 43 4f 3a  | 3900 8299 .%CO:|
00000080  41 2c 35 30 2c 37 32 25  25 56 25 25 4c 25 66 75  |A,50,72%%V%%L%fu|
00000090  6e 63 74 69 6f 6e 28 22  47 43 44 22 2c 22 6e 75  |nction("GCD","nu|
000000a0  6d 5f 31 3a 6e 75 6d 62  65 72 22 2c 22 6e 75 6d  |m_1:number","num|
000000b0  5f 32 3a 6e 75 6d 62 65  72 22 29 0a 25 56 25 25  |_2:number").%V%%|
000000c0  4c 25 73 65 74 5f 6e 61  6d 65 28 22 61 22 2c 40  |L%set_name("a",@|
000000d0  6e 75 6d 5f 31 29 0a 25  56 25 25 4c 25 73 65 74  |num_1).%V%%L%set|
000000e0  5f 6e 61 6d 65 28 22 62  22 2c 40 6e 75 6d 5f 32  |_name("b",@num_2|
000000f0  29 0a 25 56 25 25 4c 25  72 65 70 65 61 74 0a 25  |).%V%%L%repeat.%|
00000100  56 25 25 4c 25 73 65 74  5f 6e 61 6d 65 28 22 61  |V%%L%set_name("a|
00000110  22 2c 6d 6f 64 28 61 2c  62 29 29 0a 25 56 25 25  |",mod(a,b)).%V%%|
00000120  4c 25 69 66 28 61 3d 30  2c 72 65 73 75 6c 74 28  |L%if(a=0,result(|
00000130  62 29 2c 29 0a 25 56 25  25 4c 25 73 65 74 5f 6e  |b),).%V%%L%set_n|
00000140  61 6d 65 28 22 62 22 2c  6d 6f 64 28 62 2c 61 29  |ame("b",mod(b,a)|
00000150  29 0a 25 56 25 25 4c 25  75 6e 74 69 6c 28 62 3d  |).%V%%L%until(b=|
00000160  30 29 0a 25 56 25 25 4c  25 72 65 73 75 6c 74 28  |0).%V%%L%result(|
00000170  61 29 0a 25 43 4f 3a 42  2c 31 32 2c 36 30 25 25  |a).%CO:B,12,60%%|
00000180  43 4f 3a 43 2c 31 32 2c  34 38 25 25 43 4f 3a 44  |CO:C,12,48%%CO:D|
00000190  2c 31 32 2c 33 36 25 25  43 4f 3a 45 2c 31 32 2c  |,12,36%%CO:E,12,|
000001a0  32 34 25 25 43 4f 3a 46  2c 31 32 2c 31 32 25     |24%%CO:F,12,12%|
000001af