Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_16.ADF » DIAGRAM/Circle

DIAGRAM/Circle

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_User_Group » EUG_16.ADF
Filename: DIAGRAM/Circle
Read OK:
File size: 02DB bytes
Load address: 43204556
Exec address: 6C637269
File contents
PROCcircle

This is an addition for diagram which will draw a circle or an arc. 
When called the function will ask for the size. In MODE0 500 will almost 
fill the screen while 10 will be about as small as might be needed. Next 
the arc will be asked for. 20 will draw a complete circle, 5 will draw a 
45 degree arc, 10; 180 degrees and so on. 

One problem with it is that the arc is always drawn from the X 
co-ordinate and then anticlockwise. This can be a nuisance but unless 
someone can come up with a solution will have to be lived with.

The listing has been sent as a complete program, the first line calls
PROCcircle. The remainder is a repeat of line 30, PROCcircle but split up 
to make it easier to read.

Val Black

00000000  50 52 4f 43 63 69 72 63  6c 65 0d 0d 54 68 69 73  |PROCcircle..This|
00000010  20 69 73 20 61 6e 20 61  64 64 69 74 69 6f 6e 20  | is an addition |
00000020  66 6f 72 20 64 69 61 67  72 61 6d 20 77 68 69 63  |for diagram whic|
00000030  68 20 77 69 6c 6c 20 64  72 61 77 20 61 20 63 69  |h will draw a ci|
00000040  72 63 6c 65 20 6f 72 20  61 6e 20 61 72 63 2e 20  |rcle or an arc. |
00000050  0d 57 68 65 6e 20 63 61  6c 6c 65 64 20 74 68 65  |.When called the|
00000060  20 66 75 6e 63 74 69 6f  6e 20 77 69 6c 6c 20 61  | function will a|
00000070  73 6b 20 66 6f 72 20 74  68 65 20 73 69 7a 65 2e  |sk for the size.|
00000080  20 49 6e 20 4d 4f 44 45  30 20 35 30 30 20 77 69  | In MODE0 500 wi|
00000090  6c 6c 20 61 6c 6d 6f 73  74 20 0d 66 69 6c 6c 20  |ll almost .fill |
000000a0  74 68 65 20 73 63 72 65  65 6e 20 77 68 69 6c 65  |the screen while|
000000b0  20 31 30 20 77 69 6c 6c  20 62 65 20 61 62 6f 75  | 10 will be abou|
000000c0  74 20 61 73 20 73 6d 61  6c 6c 20 61 73 20 6d 69  |t as small as mi|
000000d0  67 68 74 20 62 65 20 6e  65 65 64 65 64 2e 20 4e  |ght be needed. N|
000000e0  65 78 74 20 0d 74 68 65  20 61 72 63 20 77 69 6c  |ext .the arc wil|
000000f0  6c 20 62 65 20 61 73 6b  65 64 20 66 6f 72 2e 20  |l be asked for. |
00000100  32 30 20 77 69 6c 6c 20  64 72 61 77 20 61 20 63  |20 will draw a c|
00000110  6f 6d 70 6c 65 74 65 20  63 69 72 63 6c 65 2c 20  |omplete circle, |
00000120  35 20 77 69 6c 6c 20 64  72 61 77 20 61 20 0d 34  |5 will draw a .4|
00000130  35 20 64 65 67 72 65 65  20 61 72 63 2c 20 31 30  |5 degree arc, 10|
00000140  3b 20 31 38 30 20 64 65  67 72 65 65 73 20 61 6e  |; 180 degrees an|
00000150  64 20 73 6f 20 6f 6e 2e  20 0d 0d 4f 6e 65 20 70  |d so on. ..One p|
00000160  72 6f 62 6c 65 6d 20 77  69 74 68 20 69 74 20 69  |roblem with it i|
00000170  73 20 74 68 61 74 20 74  68 65 20 61 72 63 20 69  |s that the arc i|
00000180  73 20 61 6c 77 61 79 73  20 64 72 61 77 6e 20 66  |s always drawn f|
00000190  72 6f 6d 20 74 68 65 20  58 20 0d 63 6f 2d 6f 72  |rom the X .co-or|
000001a0  64 69 6e 61 74 65 20 61  6e 64 20 74 68 65 6e 20  |dinate and then |
000001b0  61 6e 74 69 63 6c 6f 63  6b 77 69 73 65 2e 20 54  |anticlockwise. T|
000001c0  68 69 73 20 63 61 6e 20  62 65 20 61 20 6e 75 69  |his can be a nui|
000001d0  73 61 6e 63 65 20 62 75  74 20 75 6e 6c 65 73 73  |sance but unless|
000001e0  20 0d 73 6f 6d 65 6f 6e  65 20 63 61 6e 20 63 6f  | .someone can co|
000001f0  6d 65 20 75 70 20 77 69  74 68 20 61 20 73 6f 6c  |me up with a sol|
00000200  75 74 69 6f 6e 20 77 69  6c 6c 20 68 61 76 65 20  |ution will have |
00000210  74 6f 20 62 65 20 6c 69  76 65 64 20 77 69 74 68  |to be lived with|
00000220  2e 0d 0d 54 68 65 20 6c  69 73 74 69 6e 67 20 68  |...The listing h|
00000230  61 73 20 62 65 65 6e 20  73 65 6e 74 20 61 73 20  |as been sent as |
00000240  61 20 63 6f 6d 70 6c 65  74 65 20 70 72 6f 67 72  |a complete progr|
00000250  61 6d 2c 20 74 68 65 20  66 69 72 73 74 20 6c 69  |am, the first li|
00000260  6e 65 20 63 61 6c 6c 73  0d 50 52 4f 43 63 69 72  |ne calls.PROCcir|
00000270  63 6c 65 2e 20 54 68 65  20 72 65 6d 61 69 6e 64  |cle. The remaind|
00000280  65 72 20 69 73 20 61 20  72 65 70 65 61 74 20 6f  |er is a repeat o|
00000290  66 20 6c 69 6e 65 20 33  30 2c 20 50 52 4f 43 63  |f line 30, PROCc|
000002a0  69 72 63 6c 65 20 62 75  74 20 73 70 6c 69 74 20  |ircle but split |
000002b0  75 70 20 0d 74 6f 20 6d  61 6b 65 20 69 74 20 65  |up .to make it e|
000002c0  61 73 69 65 72 20 74 6f  20 72 65 61 64 2e 0d 0d  |asier to read...|
000002d0  56 61 6c 20 42 6c 61 63  6b 0d 0d                 |Val Black..|
000002db
DIAGRAM/Circle.m0
DIAGRAM/Circle.m1
DIAGRAM/Circle.m2
DIAGRAM/Circle.m4
DIAGRAM/Circle.m5