Home » Archimedes archive » Archimedes World » AW-1992-10.adf » AWOct92 » !AWOct92/Goodies/Logo/LogoProgs/Hexagons

!AWOct92/Goodies/Logo/LogoProgs/Hexagons

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 » Archimedes World » AW-1992-10.adf » AWOct92
Filename: !AWOct92/Goodies/Logo/LogoProgs/Hexagons
Read OK:
File size: 01AF bytes
Load address: 0000
Exec address: 0000
File contents
[6
HEXAGON:                      / Call `HEXAGON` six times (remember the loop!)
]
FINISH:                       / Tell logo to stop running the program   

TO HEXAGON:                   / Define a subroutine called `HEXAGON`
[5:FORWARD 50:RIGHT 360/6:]:  / Draw 5 of the hexagons sides in this loop
FORWARD 100:                  / And make the sixth side twice as long
ENDTO:                        / Thats it for this subroutine
00000000  5b 36 0a 48 45 58 41 47  4f 4e 3a 20 20 20 20 20  |[6.HEXAGON:     |
00000010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000020  20 2f 20 43 61 6c 6c 20  60 48 45 58 41 47 4f 4e  | / Call `HEXAGON|
00000030  60 20 73 69 78 20 74 69  6d 65 73 20 28 72 65 6d  |` six times (rem|
00000040  65 6d 62 65 72 20 74 68  65 20 6c 6f 6f 70 21 29  |ember the loop!)|
00000050  0a 5d 0a 46 49 4e 49 53  48 3a 20 20 20 20 20 20  |.].FINISH:      |
00000060  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000070  20 2f 20 54 65 6c 6c 20  6c 6f 67 6f 20 74 6f 20  | / Tell logo to |
00000080  73 74 6f 70 20 72 75 6e  6e 69 6e 67 20 74 68 65  |stop running the|
00000090  20 70 72 6f 67 72 61 6d  20 20 20 0a 0a 54 4f 20  | program   ..TO |
000000a0  48 45 58 41 47 4f 4e 3a  20 20 20 20 20 20 20 20  |HEXAGON:        |
000000b0  20 20 20 20 20 20 20 20  20 20 20 2f 20 44 65 66  |           / Def|
000000c0  69 6e 65 20 61 20 73 75  62 72 6f 75 74 69 6e 65  |ine a subroutine|
000000d0  20 63 61 6c 6c 65 64 20  60 48 45 58 41 47 4f 4e  | called `HEXAGON|
000000e0  60 0a 5b 35 3a 46 4f 52  57 41 52 44 20 35 30 3a  |`.[5:FORWARD 50:|
000000f0  52 49 47 48 54 20 33 36  30 2f 36 3a 5d 3a 20 20  |RIGHT 360/6:]:  |
00000100  2f 20 44 72 61 77 20 35  20 6f 66 20 74 68 65 20  |/ Draw 5 of the |
00000110  68 65 78 61 67 6f 6e 73  20 73 69 64 65 73 20 69  |hexagons sides i|
00000120  6e 20 74 68 69 73 20 6c  6f 6f 70 0a 46 4f 52 57  |n this loop.FORW|
00000130  41 52 44 20 31 30 30 3a  20 20 20 20 20 20 20 20  |ARD 100:        |
00000140  20 20 20 20 20 20 20 20  20 20 2f 20 41 6e 64 20  |          / And |
00000150  6d 61 6b 65 20 74 68 65  20 73 69 78 74 68 20 73  |make the sixth s|
00000160  69 64 65 20 74 77 69 63  65 20 61 73 20 6c 6f 6e  |ide twice as lon|
00000170  67 0a 45 4e 44 54 4f 3a  20 20 20 20 20 20 20 20  |g.ENDTO:        |
00000180  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000190  2f 20 54 68 61 74 73 20  69 74 20 66 6f 72 20 74  |/ Thats it for t|
000001a0  68 69 73 20 73 75 62 72  6f 75 74 69 6e 65 0a     |his subroutine.|
000001af