Home » Archimedes archive » Archimedes World » AW-1993-05.adf » AWMay93 » !AWMay93/Goodies/LogoV2/Technical/ASCII

!AWMay93/Goodies/LogoV2/Technical/ASCII

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-1993-05.adf » AWMay93
Filename: !AWMay93/Goodies/LogoV2/Technical/ASCII
Read OK:
File size: 24ED bytes
Load address: 0000
Exec address: 0000
File contents
           The logo interpreter By Duncan F. McPherson

                        Technical Details

Welcome to logo V2.0  � Archimedes World 1993

   My logo interpreter is now finished, and amongst many new 
features, it now offers the ability to save your logo program`s 
output as a sprite file or a draw file (so you can have logo 
generated lineart in your DTP documents e.t.c.).The interpreter 
supports loops, subroutines, command abbreviations and 
expressions (though not variables).All the usual logo commands 
are there as well, making graphics programming childsplay (even 
for big kids!).

Driving a buggy

   The robot driver program also comes with a fully working 
driver program, in its application directory (under the filename 
2Motors).This driver works with an Acorn User port expansion card 
(on my A3000) to drive my simple home made buggy (Made from plans 
in the Usborne book ROBOTICS).I have designed my !Robot 
application so anyone can easily rewrite the basic library file 
"Driver" with their own code to drive any buggy under the 
sun.This system also allows for pleanty of future expansion.

   See the REM lines in the basic file 2Motots for more details

Entering Programs

   To create a logo program you need to use a text editor such as 
edit or 1st word plus (in non wp mode).Once you have finished 
typing in your program check it over thoroughly, and make sure 
that every statement in the program is separated by either a a 
new-line code (&0D) or a `:` character.Statements that haven`t 
been separated properly will generate errors when you try to run 
your program in the interpreter.

The logo command line

   The command line window inside the logo application can be 
used to execute subroutines (by typing their names) or any normal 
logo command.Note that you cannot define TO subroutines at the 
command line, this can only be done using a textfile program.The 
program searches the currently loaded program for any name you 
type that it does not recognise as one of it`s own commands, only 
throwing back an error if no TO subroutine can be found going by 
that name
   Any normal logo command can be used at the command line 
(forward,back,left e.t.c.), as well as loops and TO subroutine 
names.Commands are separated as usual by the `:` character

The HELP function
 
   The help function is supported as a window available by 
clicking on `HELP` in the programs menu tree or by typing HELP 
followed by the logo command you would like help on.

Program execution

   Because the logo interpreter was written in BASIC, execution 
is not as fast as it might be.Also the wimp environment slows 
down programs, as extensive redrawing of the interpreters display 
window is necessary every time the turtle is moved or a line is 
drawn.To help speed up the programs execution, close the programs 
display and command line windows leaving the program status 
window open only, to indicate programs progression.

Loops

    The interpreter uses a stack system to keep track of current 
loops so you can nest loops at the command line or inside your 
programs.
    The structure of a loop is as follows :

        [<number of times to execute the loop>  <== start of loop
        FORWARD 100
        RIGHT 90                                <== statements
        e.t.c.
        ]                                       <== end of loop                   
Try the following at the command line:

                    [24:Forward 50:Right 15:]
     
   This short statement draws a circle by repeating the 
statements forward 100 and right 15 twenty four times.

   The looping system provided is a powerful feature of the 
interpreter, and can be used to repeat any logo command or 
commands several times.  

`To` subroutines

   The interpreter has provisions for subroutines via the TO and 
EndTo commands.A subroutine takes the format as follows :

   TO <name of routine> <== start defining the subroutine <name>
   FORWARD 100
   RIGHT 90           <== statements
   ENDTO              <== Tells logo that`s the end of the 
subroutine
    The subroutine can then be executed at either the command 
line or inside the program by typing its name only.
   Note subroutines cannot be defined at the command line.

The FINISH command

   This command stops the execution of the program currently 
running.It is needed to prevent the interpreter carrying on as it 
normally would to the end of a program, when a program contains 
one or more TO subroutine definitions, as if the interpreter 
tries to execute these sequentially an error will be generated.

The Error messages

   The interpreter generates the following error messages which 
are displayed in its command line window :

   Bad logo parameter
   No such subroutine
   Too many TO subroutines
   Not in a TO subroutine

   These messages reflect an error in either the users program or 
the statement just typed in at the command line window.

Background Execution

   Execution of logo programs takes place in the background (via 
the wimp`s null reason code), but statements at the command line 
take over the machine during their execution.This is not normally 
noticeable unless you have entered commands which will take some 
time to execute at the command line.To stop a command during its 
execution at the command line hit the escape key a few times

Running Programs

   Programs can be run by either typing `RUN` at the logo command 
line or by clicking on RUN in the program status window.This 
window can be displayed by clicking on the `program` option in 
the interpreters main menu tree, though this should not normally 
be necessary, as the interpreter brings up the status window as 
soon as a program is loaded.

Overheads

   Every time a logo command which moves the turtle is executed, 
the interpreter broadcasts a message over the wimp message system 
describing the command just executed.This message will normally 
be intercepted by a robot driver program which will in turn move 
a turtle around.The format of this message is as follows :

        Wimp poll code 17 (user message)

   message_block!16=&4C4F474F        ("LOGO" in ASCII")
   message_block!20=command number
   message_block+24=numeric string containing a parameter
                    to go with the command.

   The command numbers are as follows :
  
         1. Forward   (the parameter is the distance)
         2. Back      (the parameter is the distance)
         3. Left      (the parameter is the angle in degrees)
         4. Right     (the parameter is the angle in degrees)
         5. Penup     (no parameter)
         6. PenDown   (no parameter)
         7. PenColour (the parameter is the colour 0-16)

   Using this messages the application !Robot will be able to 
drive floor turtles via a logo program or commands at the logo 
command line.Presently the !Robot program only displays messages 
received in its windows, but I have left it easily alterable 
(just fill in the blank procedures) so that I can make it drive 
various buggy`s and floor turtles at a later data.

Comments inserted into programs

      You can insert any comment you like in your ASCII text 
program file after a `/` command.This command behaves just like 
BASIC`s REM command.
   Remember that after your comment still put in a `:` character 
or a return code, to separate it from the next statement.The same 
goes for the statement before your comment.

The basic logo commands

Forward <distance> Moves your turtle forward the distance 
specified by you in the parameter following it.

Back <distance> Moves the turtle back <distance> units

Left <angle> Turns the turtle anti-clockwise through <angle> 
degrees

Right <angle> Turns the turtle clockwise through <angle> degrees

PenUp   Tells the interpreter not to draw lines

PenDown Tells the interpreter to draw lines when the turtle moves

PenColour <colour> Tells the interpreter to draw the lines in 
colour <colour>   
Home    Moves the turtle back to its home position and angle

SetHome Takes the current position and angle to be the turtles 
home position and angle

Clear   Clears the logo display window to the default white

ReStart Resets the entire logo display (not the program running)

Angle <degrees> Sets the turtle`s angle to <degrees>
Run   Tells the interpreter to begin executing the currently 
loaded logo textfile program

   Most logo commands have minimum abbreviations, which can make 
program entry easier.Many numeric parameters can have 
mathematical expressions used in place of just numbers though 
variables are not supported currently.Also note that the letter 
case of the commands dosen`t matter, the interpreter will 
recognise the command either way.

To find out a commands abbreviation use the help window 
(available by clicking on help in the interpreters main menu 
tree).Once the window is displayed click on the command you want 
to know about.

Debugging your program

   Debugging a logo program is mainly up to the user, however the 
percentage display in the program status window, constantly 
updated whilst a program is run, will indicate the percentage 
through the programs textfile, the command where the error 
occurred was after the bug is reached.

   I have found a common sources of errors in programs are either 
mistyped commands (generating `No such subroutine`) and missing 
separators between statements (generating `Bad Logo parameter`).
 

00000000  20 20 20 20 20 20 20 20  20 20 20 54 68 65 20 6c  |           The l|
00000010  6f 67 6f 20 69 6e 74 65  72 70 72 65 74 65 72 20  |ogo interpreter |
00000020  42 79 20 44 75 6e 63 61  6e 20 46 2e 20 4d 63 50  |By Duncan F. McP|
00000030  68 65 72 73 6f 6e 0a 0a  20 20 20 20 20 20 20 20  |herson..        |
00000040  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000050  54 65 63 68 6e 69 63 61  6c 20 44 65 74 61 69 6c  |Technical Detail|
00000060  73 0a 0a 57 65 6c 63 6f  6d 65 20 74 6f 20 6c 6f  |s..Welcome to lo|
00000070  67 6f 20 56 32 2e 30 20  20 a9 20 41 72 63 68 69  |go V2.0  . Archi|
00000080  6d 65 64 65 73 20 57 6f  72 6c 64 20 31 39 39 33  |medes World 1993|
00000090  0a 0a 20 20 20 4d 79 20  6c 6f 67 6f 20 69 6e 74  |..   My logo int|
000000a0  65 72 70 72 65 74 65 72  20 69 73 20 6e 6f 77 20  |erpreter is now |
000000b0  66 69 6e 69 73 68 65 64  2c 20 61 6e 64 20 61 6d  |finished, and am|
000000c0  6f 6e 67 73 74 20 6d 61  6e 79 20 6e 65 77 20 0a  |ongst many new .|
000000d0  66 65 61 74 75 72 65 73  2c 20 69 74 20 6e 6f 77  |features, it now|
000000e0  20 6f 66 66 65 72 73 20  74 68 65 20 61 62 69 6c  | offers the abil|
000000f0  69 74 79 20 74 6f 20 73  61 76 65 20 79 6f 75 72  |ity to save your|
00000100  20 6c 6f 67 6f 20 70 72  6f 67 72 61 6d 60 73 20  | logo program`s |
00000110  0a 6f 75 74 70 75 74 20  61 73 20 61 20 73 70 72  |.output as a spr|
00000120  69 74 65 20 66 69 6c 65  20 6f 72 20 61 20 64 72  |ite file or a dr|
00000130  61 77 20 66 69 6c 65 20  28 73 6f 20 79 6f 75 20  |aw file (so you |
00000140  63 61 6e 20 68 61 76 65  20 6c 6f 67 6f 20 0a 67  |can have logo .g|
00000150  65 6e 65 72 61 74 65 64  20 6c 69 6e 65 61 72 74  |enerated lineart|
00000160  20 69 6e 20 79 6f 75 72  20 44 54 50 20 64 6f 63  | in your DTP doc|
00000170  75 6d 65 6e 74 73 20 65  2e 74 2e 63 2e 29 2e 54  |uments e.t.c.).T|
00000180  68 65 20 69 6e 74 65 72  70 72 65 74 65 72 20 0a  |he interpreter .|
00000190  73 75 70 70 6f 72 74 73  20 6c 6f 6f 70 73 2c 20  |supports loops, |
000001a0  73 75 62 72 6f 75 74 69  6e 65 73 2c 20 63 6f 6d  |subroutines, com|
000001b0  6d 61 6e 64 20 61 62 62  72 65 76 69 61 74 69 6f  |mand abbreviatio|
000001c0  6e 73 20 61 6e 64 20 0a  65 78 70 72 65 73 73 69  |ns and .expressi|
000001d0  6f 6e 73 20 28 74 68 6f  75 67 68 20 6e 6f 74 20  |ons (though not |
000001e0  76 61 72 69 61 62 6c 65  73 29 2e 41 6c 6c 20 74  |variables).All t|
000001f0  68 65 20 75 73 75 61 6c  20 6c 6f 67 6f 20 63 6f  |he usual logo co|
00000200  6d 6d 61 6e 64 73 20 0a  61 72 65 20 74 68 65 72  |mmands .are ther|
00000210  65 20 61 73 20 77 65 6c  6c 2c 20 6d 61 6b 69 6e  |e as well, makin|
00000220  67 20 67 72 61 70 68 69  63 73 20 70 72 6f 67 72  |g graphics progr|
00000230  61 6d 6d 69 6e 67 20 63  68 69 6c 64 73 70 6c 61  |amming childspla|
00000240  79 20 28 65 76 65 6e 20  0a 66 6f 72 20 62 69 67  |y (even .for big|
00000250  20 6b 69 64 73 21 29 2e  0a 0a 44 72 69 76 69 6e  | kids!)...Drivin|
00000260  67 20 61 20 62 75 67 67  79 0a 0a 20 20 20 54 68  |g a buggy..   Th|
00000270  65 20 72 6f 62 6f 74 20  64 72 69 76 65 72 20 70  |e robot driver p|
00000280  72 6f 67 72 61 6d 20 61  6c 73 6f 20 63 6f 6d 65  |rogram also come|
00000290  73 20 77 69 74 68 20 61  20 66 75 6c 6c 79 20 77  |s with a fully w|
000002a0  6f 72 6b 69 6e 67 20 0a  64 72 69 76 65 72 20 70  |orking .driver p|
000002b0  72 6f 67 72 61 6d 2c 20  69 6e 20 69 74 73 20 61  |rogram, in its a|
000002c0  70 70 6c 69 63 61 74 69  6f 6e 20 64 69 72 65 63  |pplication direc|
000002d0  74 6f 72 79 20 28 75 6e  64 65 72 20 74 68 65 20  |tory (under the |
000002e0  66 69 6c 65 6e 61 6d 65  20 0a 32 4d 6f 74 6f 72  |filename .2Motor|
000002f0  73 29 2e 54 68 69 73 20  64 72 69 76 65 72 20 77  |s).This driver w|
00000300  6f 72 6b 73 20 77 69 74  68 20 61 6e 20 41 63 6f  |orks with an Aco|
00000310  72 6e 20 55 73 65 72 20  70 6f 72 74 20 65 78 70  |rn User port exp|
00000320  61 6e 73 69 6f 6e 20 63  61 72 64 20 0a 28 6f 6e  |ansion card .(on|
00000330  20 6d 79 20 41 33 30 30  30 29 20 74 6f 20 64 72  | my A3000) to dr|
00000340  69 76 65 20 6d 79 20 73  69 6d 70 6c 65 20 68 6f  |ive my simple ho|
00000350  6d 65 20 6d 61 64 65 20  62 75 67 67 79 20 28 4d  |me made buggy (M|
00000360  61 64 65 20 66 72 6f 6d  20 70 6c 61 6e 73 20 0a  |ade from plans .|
00000370  69 6e 20 74 68 65 20 55  73 62 6f 72 6e 65 20 62  |in the Usborne b|
00000380  6f 6f 6b 20 52 4f 42 4f  54 49 43 53 29 2e 49 20  |ook ROBOTICS).I |
00000390  68 61 76 65 20 64 65 73  69 67 6e 65 64 20 6d 79  |have designed my|
000003a0  20 21 52 6f 62 6f 74 20  0a 61 70 70 6c 69 63 61  | !Robot .applica|
000003b0  74 69 6f 6e 20 73 6f 20  61 6e 79 6f 6e 65 20 63  |tion so anyone c|
000003c0  61 6e 20 65 61 73 69 6c  79 20 72 65 77 72 69 74  |an easily rewrit|
000003d0  65 20 74 68 65 20 62 61  73 69 63 20 6c 69 62 72  |e the basic libr|
000003e0  61 72 79 20 66 69 6c 65  20 0a 22 44 72 69 76 65  |ary file ."Drive|
000003f0  72 22 20 77 69 74 68 20  74 68 65 69 72 20 6f 77  |r" with their ow|
00000400  6e 20 63 6f 64 65 20 74  6f 20 64 72 69 76 65 20  |n code to drive |
00000410  61 6e 79 20 62 75 67 67  79 20 75 6e 64 65 72 20  |any buggy under |
00000420  74 68 65 20 0a 73 75 6e  2e 54 68 69 73 20 73 79  |the .sun.This sy|
00000430  73 74 65 6d 20 61 6c 73  6f 20 61 6c 6c 6f 77 73  |stem also allows|
00000440  20 66 6f 72 20 70 6c 65  61 6e 74 79 20 6f 66 20  | for pleanty of |
00000450  66 75 74 75 72 65 20 65  78 70 61 6e 73 69 6f 6e  |future expansion|
00000460  2e 0a 0a 20 20 20 53 65  65 20 74 68 65 20 52 45  |...   See the RE|
00000470  4d 20 6c 69 6e 65 73 20  69 6e 20 74 68 65 20 62  |M lines in the b|
00000480  61 73 69 63 20 66 69 6c  65 20 32 4d 6f 74 6f 74  |asic file 2Motot|
00000490  73 20 66 6f 72 20 6d 6f  72 65 20 64 65 74 61 69  |s for more detai|
000004a0  6c 73 0a 0a 45 6e 74 65  72 69 6e 67 20 50 72 6f  |ls..Entering Pro|
000004b0  67 72 61 6d 73 0a 0a 20  20 20 54 6f 20 63 72 65  |grams..   To cre|
000004c0  61 74 65 20 61 20 6c 6f  67 6f 20 70 72 6f 67 72  |ate a logo progr|
000004d0  61 6d 20 79 6f 75 20 6e  65 65 64 20 74 6f 20 75  |am you need to u|
000004e0  73 65 20 61 20 74 65 78  74 20 65 64 69 74 6f 72  |se a text editor|
000004f0  20 73 75 63 68 20 61 73  20 0a 65 64 69 74 20 6f  | such as .edit o|
00000500  72 20 31 73 74 20 77 6f  72 64 20 70 6c 75 73 20  |r 1st word plus |
00000510  28 69 6e 20 6e 6f 6e 20  77 70 20 6d 6f 64 65 29  |(in non wp mode)|
00000520  2e 4f 6e 63 65 20 79 6f  75 20 68 61 76 65 20 66  |.Once you have f|
00000530  69 6e 69 73 68 65 64 20  0a 74 79 70 69 6e 67 20  |inished .typing |
00000540  69 6e 20 79 6f 75 72 20  70 72 6f 67 72 61 6d 20  |in your program |
00000550  63 68 65 63 6b 20 69 74  20 6f 76 65 72 20 74 68  |check it over th|
00000560  6f 72 6f 75 67 68 6c 79  2c 20 61 6e 64 20 6d 61  |oroughly, and ma|
00000570  6b 65 20 73 75 72 65 20  0a 74 68 61 74 20 65 76  |ke sure .that ev|
00000580  65 72 79 20 73 74 61 74  65 6d 65 6e 74 20 69 6e  |ery statement in|
00000590  20 74 68 65 20 70 72 6f  67 72 61 6d 20 69 73 20  | the program is |
000005a0  73 65 70 61 72 61 74 65  64 20 62 79 20 65 69 74  |separated by eit|
000005b0  68 65 72 20 61 20 61 20  0a 6e 65 77 2d 6c 69 6e  |her a a .new-lin|
000005c0  65 20 63 6f 64 65 20 28  26 30 44 29 20 6f 72 20  |e code (&0D) or |
000005d0  61 20 60 3a 60 20 63 68  61 72 61 63 74 65 72 2e  |a `:` character.|
000005e0  53 74 61 74 65 6d 65 6e  74 73 20 74 68 61 74 20  |Statements that |
000005f0  68 61 76 65 6e 60 74 20  0a 62 65 65 6e 20 73 65  |haven`t .been se|
00000600  70 61 72 61 74 65 64 20  70 72 6f 70 65 72 6c 79  |parated properly|
00000610  20 77 69 6c 6c 20 67 65  6e 65 72 61 74 65 20 65  | will generate e|
00000620  72 72 6f 72 73 20 77 68  65 6e 20 79 6f 75 20 74  |rrors when you t|
00000630  72 79 20 74 6f 20 72 75  6e 20 0a 79 6f 75 72 20  |ry to run .your |
00000640  70 72 6f 67 72 61 6d 20  69 6e 20 74 68 65 20 69  |program in the i|
00000650  6e 74 65 72 70 72 65 74  65 72 2e 0a 0a 54 68 65  |nterpreter...The|
00000660  20 6c 6f 67 6f 20 63 6f  6d 6d 61 6e 64 20 6c 69  | logo command li|
00000670  6e 65 0a 0a 20 20 20 54  68 65 20 63 6f 6d 6d 61  |ne..   The comma|
00000680  6e 64 20 6c 69 6e 65 20  77 69 6e 64 6f 77 20 69  |nd line window i|
00000690  6e 73 69 64 65 20 74 68  65 20 6c 6f 67 6f 20 61  |nside the logo a|
000006a0  70 70 6c 69 63 61 74 69  6f 6e 20 63 61 6e 20 62  |pplication can b|
000006b0  65 20 0a 75 73 65 64 20  74 6f 20 65 78 65 63 75  |e .used to execu|
000006c0  74 65 20 73 75 62 72 6f  75 74 69 6e 65 73 20 28  |te subroutines (|
000006d0  62 79 20 74 79 70 69 6e  67 20 74 68 65 69 72 20  |by typing their |
000006e0  6e 61 6d 65 73 29 20 6f  72 20 61 6e 79 20 6e 6f  |names) or any no|
000006f0  72 6d 61 6c 20 0a 6c 6f  67 6f 20 63 6f 6d 6d 61  |rmal .logo comma|
00000700  6e 64 2e 4e 6f 74 65 20  74 68 61 74 20 79 6f 75  |nd.Note that you|
00000710  20 63 61 6e 6e 6f 74 20  64 65 66 69 6e 65 20 54  | cannot define T|
00000720  4f 20 73 75 62 72 6f 75  74 69 6e 65 73 20 61 74  |O subroutines at|
00000730  20 74 68 65 20 0a 63 6f  6d 6d 61 6e 64 20 6c 69  | the .command li|
00000740  6e 65 2c 20 74 68 69 73  20 63 61 6e 20 6f 6e 6c  |ne, this can onl|
00000750  79 20 62 65 20 64 6f 6e  65 20 75 73 69 6e 67 20  |y be done using |
00000760  61 20 74 65 78 74 66 69  6c 65 20 70 72 6f 67 72  |a textfile progr|
00000770  61 6d 2e 54 68 65 20 0a  70 72 6f 67 72 61 6d 20  |am.The .program |
00000780  73 65 61 72 63 68 65 73  20 74 68 65 20 63 75 72  |searches the cur|
00000790  72 65 6e 74 6c 79 20 6c  6f 61 64 65 64 20 70 72  |rently loaded pr|
000007a0  6f 67 72 61 6d 20 66 6f  72 20 61 6e 79 20 6e 61  |ogram for any na|
000007b0  6d 65 20 79 6f 75 20 0a  74 79 70 65 20 74 68 61  |me you .type tha|
000007c0  74 20 69 74 20 64 6f 65  73 20 6e 6f 74 20 72 65  |t it does not re|
000007d0  63 6f 67 6e 69 73 65 20  61 73 20 6f 6e 65 20 6f  |cognise as one o|
000007e0  66 20 69 74 60 73 20 6f  77 6e 20 63 6f 6d 6d 61  |f it`s own comma|
000007f0  6e 64 73 2c 20 6f 6e 6c  79 20 0a 74 68 72 6f 77  |nds, only .throw|
00000800  69 6e 67 20 62 61 63 6b  20 61 6e 20 65 72 72 6f  |ing back an erro|
00000810  72 20 69 66 20 6e 6f 20  54 4f 20 73 75 62 72 6f  |r if no TO subro|
00000820  75 74 69 6e 65 20 63 61  6e 20 62 65 20 66 6f 75  |utine can be fou|
00000830  6e 64 20 67 6f 69 6e 67  20 62 79 20 0a 74 68 61  |nd going by .tha|
00000840  74 20 6e 61 6d 65 0a 20  20 20 41 6e 79 20 6e 6f  |t name.   Any no|
00000850  72 6d 61 6c 20 6c 6f 67  6f 20 63 6f 6d 6d 61 6e  |rmal logo comman|
00000860  64 20 63 61 6e 20 62 65  20 75 73 65 64 20 61 74  |d can be used at|
00000870  20 74 68 65 20 63 6f 6d  6d 61 6e 64 20 6c 69 6e  | the command lin|
00000880  65 20 0a 28 66 6f 72 77  61 72 64 2c 62 61 63 6b  |e .(forward,back|
00000890  2c 6c 65 66 74 20 65 2e  74 2e 63 2e 29 2c 20 61  |,left e.t.c.), a|
000008a0  73 20 77 65 6c 6c 20 61  73 20 6c 6f 6f 70 73 20  |s well as loops |
000008b0  61 6e 64 20 54 4f 20 73  75 62 72 6f 75 74 69 6e  |and TO subroutin|
000008c0  65 20 0a 6e 61 6d 65 73  2e 43 6f 6d 6d 61 6e 64  |e .names.Command|
000008d0  73 20 61 72 65 20 73 65  70 61 72 61 74 65 64 20  |s are separated |
000008e0  61 73 20 75 73 75 61 6c  20 62 79 20 74 68 65 20  |as usual by the |
000008f0  60 3a 60 20 63 68 61 72  61 63 74 65 72 0a 0a 54  |`:` character..T|
00000900  68 65 20 48 45 4c 50 20  66 75 6e 63 74 69 6f 6e  |he HELP function|
00000910  0a 20 0a 20 20 20 54 68  65 20 68 65 6c 70 20 66  |. .   The help f|
00000920  75 6e 63 74 69 6f 6e 20  69 73 20 73 75 70 70 6f  |unction is suppo|
00000930  72 74 65 64 20 61 73 20  61 20 77 69 6e 64 6f 77  |rted as a window|
00000940  20 61 76 61 69 6c 61 62  6c 65 20 62 79 20 0a 63  | available by .c|
00000950  6c 69 63 6b 69 6e 67 20  6f 6e 20 60 48 45 4c 50  |licking on `HELP|
00000960  60 20 69 6e 20 74 68 65  20 70 72 6f 67 72 61 6d  |` in the program|
00000970  73 20 6d 65 6e 75 20 74  72 65 65 20 6f 72 20 62  |s menu tree or b|
00000980  79 20 74 79 70 69 6e 67  20 48 45 4c 50 20 0a 66  |y typing HELP .f|
00000990  6f 6c 6c 6f 77 65 64 20  62 79 20 74 68 65 20 6c  |ollowed by the l|
000009a0  6f 67 6f 20 63 6f 6d 6d  61 6e 64 20 79 6f 75 20  |ogo command you |
000009b0  77 6f 75 6c 64 20 6c 69  6b 65 20 68 65 6c 70 20  |would like help |
000009c0  6f 6e 2e 0a 0a 50 72 6f  67 72 61 6d 20 65 78 65  |on...Program exe|
000009d0  63 75 74 69 6f 6e 0a 0a  20 20 20 42 65 63 61 75  |cution..   Becau|
000009e0  73 65 20 74 68 65 20 6c  6f 67 6f 20 69 6e 74 65  |se the logo inte|
000009f0  72 70 72 65 74 65 72 20  77 61 73 20 77 72 69 74  |rpreter was writ|
00000a00  74 65 6e 20 69 6e 20 42  41 53 49 43 2c 20 65 78  |ten in BASIC, ex|
00000a10  65 63 75 74 69 6f 6e 20  0a 69 73 20 6e 6f 74 20  |ecution .is not |
00000a20  61 73 20 66 61 73 74 20  61 73 20 69 74 20 6d 69  |as fast as it mi|
00000a30  67 68 74 20 62 65 2e 41  6c 73 6f 20 74 68 65 20  |ght be.Also the |
00000a40  77 69 6d 70 20 65 6e 76  69 72 6f 6e 6d 65 6e 74  |wimp environment|
00000a50  20 73 6c 6f 77 73 20 0a  64 6f 77 6e 20 70 72 6f  | slows .down pro|
00000a60  67 72 61 6d 73 2c 20 61  73 20 65 78 74 65 6e 73  |grams, as extens|
00000a70  69 76 65 20 72 65 64 72  61 77 69 6e 67 20 6f 66  |ive redrawing of|
00000a80  20 74 68 65 20 69 6e 74  65 72 70 72 65 74 65 72  | the interpreter|
00000a90  73 20 64 69 73 70 6c 61  79 20 0a 77 69 6e 64 6f  |s display .windo|
00000aa0  77 20 69 73 20 6e 65 63  65 73 73 61 72 79 20 65  |w is necessary e|
00000ab0  76 65 72 79 20 74 69 6d  65 20 74 68 65 20 74 75  |very time the tu|
00000ac0  72 74 6c 65 20 69 73 20  6d 6f 76 65 64 20 6f 72  |rtle is moved or|
00000ad0  20 61 20 6c 69 6e 65 20  69 73 20 0a 64 72 61 77  | a line is .draw|
00000ae0  6e 2e 54 6f 20 68 65 6c  70 20 73 70 65 65 64 20  |n.To help speed |
00000af0  75 70 20 74 68 65 20 70  72 6f 67 72 61 6d 73 20  |up the programs |
00000b00  65 78 65 63 75 74 69 6f  6e 2c 20 63 6c 6f 73 65  |execution, close|
00000b10  20 74 68 65 20 70 72 6f  67 72 61 6d 73 20 0a 64  | the programs .d|
00000b20  69 73 70 6c 61 79 20 61  6e 64 20 63 6f 6d 6d 61  |isplay and comma|
00000b30  6e 64 20 6c 69 6e 65 20  77 69 6e 64 6f 77 73 20  |nd line windows |
00000b40  6c 65 61 76 69 6e 67 20  74 68 65 20 70 72 6f 67  |leaving the prog|
00000b50  72 61 6d 20 73 74 61 74  75 73 20 0a 77 69 6e 64  |ram status .wind|
00000b60  6f 77 20 6f 70 65 6e 20  6f 6e 6c 79 2c 20 74 6f  |ow open only, to|
00000b70  20 69 6e 64 69 63 61 74  65 20 70 72 6f 67 72 61  | indicate progra|
00000b80  6d 73 20 70 72 6f 67 72  65 73 73 69 6f 6e 2e 0a  |ms progression..|
00000b90  0a 4c 6f 6f 70 73 0a 0a  20 20 20 20 54 68 65 20  |.Loops..    The |
00000ba0  69 6e 74 65 72 70 72 65  74 65 72 20 75 73 65 73  |interpreter uses|
00000bb0  20 61 20 73 74 61 63 6b  20 73 79 73 74 65 6d 20  | a stack system |
00000bc0  74 6f 20 6b 65 65 70 20  74 72 61 63 6b 20 6f 66  |to keep track of|
00000bd0  20 63 75 72 72 65 6e 74  20 0a 6c 6f 6f 70 73 20  | current .loops |
00000be0  73 6f 20 79 6f 75 20 63  61 6e 20 6e 65 73 74 20  |so you can nest |
00000bf0  6c 6f 6f 70 73 20 61 74  20 74 68 65 20 63 6f 6d  |loops at the com|
00000c00  6d 61 6e 64 20 6c 69 6e  65 20 6f 72 20 69 6e 73  |mand line or ins|
00000c10  69 64 65 20 79 6f 75 72  20 0a 70 72 6f 67 72 61  |ide your .progra|
00000c20  6d 73 2e 0a 20 20 20 20  54 68 65 20 73 74 72 75  |ms..    The stru|
00000c30  63 74 75 72 65 20 6f 66  20 61 20 6c 6f 6f 70 20  |cture of a loop |
00000c40  69 73 20 61 73 20 66 6f  6c 6c 6f 77 73 20 3a 0a  |is as follows :.|
00000c50  0a 20 20 20 20 20 20 20  20 5b 3c 6e 75 6d 62 65  |.        [<numbe|
00000c60  72 20 6f 66 20 74 69 6d  65 73 20 74 6f 20 65 78  |r of times to ex|
00000c70  65 63 75 74 65 20 74 68  65 20 6c 6f 6f 70 3e 20  |ecute the loop> |
00000c80  20 3c 3d 3d 20 73 74 61  72 74 20 6f 66 20 6c 6f  | <== start of lo|
00000c90  6f 70 0a 20 20 20 20 20  20 20 20 46 4f 52 57 41  |op.        FORWA|
00000ca0  52 44 20 31 30 30 0a 20  20 20 20 20 20 20 20 52  |RD 100.        R|
00000cb0  49 47 48 54 20 39 30 20  20 20 20 20 20 20 20 20  |IGHT 90         |
00000cc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000cd0  20 20 20 20 20 20 20 3c  3d 3d 20 73 74 61 74 65  |       <== state|
00000ce0  6d 65 6e 74 73 0a 20 20  20 20 20 20 20 20 65 2e  |ments.        e.|
00000cf0  74 2e 63 2e 0a 20 20 20  20 20 20 20 20 5d 20 20  |t.c..        ]  |
00000d00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000d20  20 20 20 20 20 3c 3d 3d  20 65 6e 64 20 6f 66 20  |     <== end of |
00000d30  6c 6f 6f 70 20 20 20 20  20 20 20 20 20 20 20 20  |loop            |
00000d40  20 20 20 20 20 20 20 0a  54 72 79 20 74 68 65 20  |       .Try the |
00000d50  66 6f 6c 6c 6f 77 69 6e  67 20 61 74 20 74 68 65  |following at the|
00000d60  20 63 6f 6d 6d 61 6e 64  20 6c 69 6e 65 3a 0a 0a  | command line:..|
00000d70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000d80  20 20 20 20 5b 32 34 3a  46 6f 72 77 61 72 64 20  |    [24:Forward |
00000d90  35 30 3a 52 69 67 68 74  20 31 35 3a 5d 0a 20 20  |50:Right 15:].  |
00000da0  20 20 20 0a 20 20 20 54  68 69 73 20 73 68 6f 72  |   .   This shor|
00000db0  74 20 73 74 61 74 65 6d  65 6e 74 20 64 72 61 77  |t statement draw|
00000dc0  73 20 61 20 63 69 72 63  6c 65 20 62 79 20 72 65  |s a circle by re|
00000dd0  70 65 61 74 69 6e 67 20  74 68 65 20 0a 73 74 61  |peating the .sta|
00000de0  74 65 6d 65 6e 74 73 20  66 6f 72 77 61 72 64 20  |tements forward |
00000df0  31 30 30 20 61 6e 64 20  72 69 67 68 74 20 31 35  |100 and right 15|
00000e00  20 74 77 65 6e 74 79 20  66 6f 75 72 20 74 69 6d  | twenty four tim|
00000e10  65 73 2e 0a 0a 20 20 20  54 68 65 20 6c 6f 6f 70  |es...   The loop|
00000e20  69 6e 67 20 73 79 73 74  65 6d 20 70 72 6f 76 69  |ing system provi|
00000e30  64 65 64 20 69 73 20 61  20 70 6f 77 65 72 66 75  |ded is a powerfu|
00000e40  6c 20 66 65 61 74 75 72  65 20 6f 66 20 74 68 65  |l feature of the|
00000e50  20 0a 69 6e 74 65 72 70  72 65 74 65 72 2c 20 61  | .interpreter, a|
00000e60  6e 64 20 63 61 6e 20 62  65 20 75 73 65 64 20 74  |nd can be used t|
00000e70  6f 20 72 65 70 65 61 74  20 61 6e 79 20 6c 6f 67  |o repeat any log|
00000e80  6f 20 63 6f 6d 6d 61 6e  64 20 6f 72 20 0a 63 6f  |o command or .co|
00000e90  6d 6d 61 6e 64 73 20 73  65 76 65 72 61 6c 20 74  |mmands several t|
00000ea0  69 6d 65 73 2e 20 20 0a  0a 60 54 6f 60 20 73 75  |imes.  ..`To` su|
00000eb0  62 72 6f 75 74 69 6e 65  73 0a 0a 20 20 20 54 68  |broutines..   Th|
00000ec0  65 20 69 6e 74 65 72 70  72 65 74 65 72 20 68 61  |e interpreter ha|
00000ed0  73 20 70 72 6f 76 69 73  69 6f 6e 73 20 66 6f 72  |s provisions for|
00000ee0  20 73 75 62 72 6f 75 74  69 6e 65 73 20 76 69 61  | subroutines via|
00000ef0  20 74 68 65 20 54 4f 20  61 6e 64 20 0a 45 6e 64  | the TO and .End|
00000f00  54 6f 20 63 6f 6d 6d 61  6e 64 73 2e 41 20 73 75  |To commands.A su|
00000f10  62 72 6f 75 74 69 6e 65  20 74 61 6b 65 73 20 74  |broutine takes t|
00000f20  68 65 20 66 6f 72 6d 61  74 20 61 73 20 66 6f 6c  |he format as fol|
00000f30  6c 6f 77 73 20 3a 0a 0a  20 20 20 54 4f 20 3c 6e  |lows :..   TO <n|
00000f40  61 6d 65 20 6f 66 20 72  6f 75 74 69 6e 65 3e 20  |ame of routine> |
00000f50  3c 3d 3d 20 73 74 61 72  74 20 64 65 66 69 6e 69  |<== start defini|
00000f60  6e 67 20 74 68 65 20 73  75 62 72 6f 75 74 69 6e  |ng the subroutin|
00000f70  65 20 3c 6e 61 6d 65 3e  0a 20 20 20 46 4f 52 57  |e <name>.   FORW|
00000f80  41 52 44 20 31 30 30 0a  20 20 20 52 49 47 48 54  |ARD 100.   RIGHT|
00000f90  20 39 30 20 20 20 20 20  20 20 20 20 20 20 3c 3d  | 90           <=|
00000fa0  3d 20 73 74 61 74 65 6d  65 6e 74 73 0a 20 20 20  |= statements.   |
00000fb0  45 4e 44 54 4f 20 20 20  20 20 20 20 20 20 20 20  |ENDTO           |
00000fc0  20 20 20 3c 3d 3d 20 54  65 6c 6c 73 20 6c 6f 67  |   <== Tells log|
00000fd0  6f 20 74 68 61 74 60 73  20 74 68 65 20 65 6e 64  |o that`s the end|
00000fe0  20 6f 66 20 74 68 65 20  0a 73 75 62 72 6f 75 74  | of the .subrout|
00000ff0  69 6e 65 0a 20 20 20 20  54 68 65 20 73 75 62 72  |ine.    The subr|
00001000  6f 75 74 69 6e 65 20 63  61 6e 20 74 68 65 6e 20  |outine can then |
00001010  62 65 20 65 78 65 63 75  74 65 64 20 61 74 20 65  |be executed at e|
00001020  69 74 68 65 72 20 74 68  65 20 63 6f 6d 6d 61 6e  |ither the comman|
00001030  64 20 0a 6c 69 6e 65 20  6f 72 20 69 6e 73 69 64  |d .line or insid|
00001040  65 20 74 68 65 20 70 72  6f 67 72 61 6d 20 62 79  |e the program by|
00001050  20 74 79 70 69 6e 67 20  69 74 73 20 6e 61 6d 65  | typing its name|
00001060  20 6f 6e 6c 79 2e 0a 20  20 20 4e 6f 74 65 20 73  | only..   Note s|
00001070  75 62 72 6f 75 74 69 6e  65 73 20 63 61 6e 6e 6f  |ubroutines canno|
00001080  74 20 62 65 20 64 65 66  69 6e 65 64 20 61 74 20  |t be defined at |
00001090  74 68 65 20 63 6f 6d 6d  61 6e 64 20 6c 69 6e 65  |the command line|
000010a0  2e 0a 0a 54 68 65 20 46  49 4e 49 53 48 20 63 6f  |...The FINISH co|
000010b0  6d 6d 61 6e 64 0a 0a 20  20 20 54 68 69 73 20 63  |mmand..   This c|
000010c0  6f 6d 6d 61 6e 64 20 73  74 6f 70 73 20 74 68 65  |ommand stops the|
000010d0  20 65 78 65 63 75 74 69  6f 6e 20 6f 66 20 74 68  | execution of th|
000010e0  65 20 70 72 6f 67 72 61  6d 20 63 75 72 72 65 6e  |e program curren|
000010f0  74 6c 79 20 0a 72 75 6e  6e 69 6e 67 2e 49 74 20  |tly .running.It |
00001100  69 73 20 6e 65 65 64 65  64 20 74 6f 20 70 72 65  |is needed to pre|
00001110  76 65 6e 74 20 74 68 65  20 69 6e 74 65 72 70 72  |vent the interpr|
00001120  65 74 65 72 20 63 61 72  72 79 69 6e 67 20 6f 6e  |eter carrying on|
00001130  20 61 73 20 69 74 20 0a  6e 6f 72 6d 61 6c 6c 79  | as it .normally|
00001140  20 77 6f 75 6c 64 20 74  6f 20 74 68 65 20 65 6e  | would to the en|
00001150  64 20 6f 66 20 61 20 70  72 6f 67 72 61 6d 2c 20  |d of a program, |
00001160  77 68 65 6e 20 61 20 70  72 6f 67 72 61 6d 20 63  |when a program c|
00001170  6f 6e 74 61 69 6e 73 20  0a 6f 6e 65 20 6f 72 20  |ontains .one or |
00001180  6d 6f 72 65 20 54 4f 20  73 75 62 72 6f 75 74 69  |more TO subrouti|
00001190  6e 65 20 64 65 66 69 6e  69 74 69 6f 6e 73 2c 20  |ne definitions, |
000011a0  61 73 20 69 66 20 74 68  65 20 69 6e 74 65 72 70  |as if the interp|
000011b0  72 65 74 65 72 20 0a 74  72 69 65 73 20 74 6f 20  |reter .tries to |
000011c0  65 78 65 63 75 74 65 20  74 68 65 73 65 20 73 65  |execute these se|
000011d0  71 75 65 6e 74 69 61 6c  6c 79 20 61 6e 20 65 72  |quentially an er|
000011e0  72 6f 72 20 77 69 6c 6c  20 62 65 20 67 65 6e 65  |ror will be gene|
000011f0  72 61 74 65 64 2e 0a 0a  54 68 65 20 45 72 72 6f  |rated...The Erro|
00001200  72 20 6d 65 73 73 61 67  65 73 0a 0a 20 20 20 54  |r messages..   T|
00001210  68 65 20 69 6e 74 65 72  70 72 65 74 65 72 20 67  |he interpreter g|
00001220  65 6e 65 72 61 74 65 73  20 74 68 65 20 66 6f 6c  |enerates the fol|
00001230  6c 6f 77 69 6e 67 20 65  72 72 6f 72 20 6d 65 73  |lowing error mes|
00001240  73 61 67 65 73 20 77 68  69 63 68 20 0a 61 72 65  |sages which .are|
00001250  20 64 69 73 70 6c 61 79  65 64 20 69 6e 20 69 74  | displayed in it|
00001260  73 20 63 6f 6d 6d 61 6e  64 20 6c 69 6e 65 20 77  |s command line w|
00001270  69 6e 64 6f 77 20 3a 0a  0a 20 20 20 42 61 64 20  |indow :..   Bad |
00001280  6c 6f 67 6f 20 70 61 72  61 6d 65 74 65 72 0a 20  |logo parameter. |
00001290  20 20 4e 6f 20 73 75 63  68 20 73 75 62 72 6f 75  |  No such subrou|
000012a0  74 69 6e 65 0a 20 20 20  54 6f 6f 20 6d 61 6e 79  |tine.   Too many|
000012b0  20 54 4f 20 73 75 62 72  6f 75 74 69 6e 65 73 0a  | TO subroutines.|
000012c0  20 20 20 4e 6f 74 20 69  6e 20 61 20 54 4f 20 73  |   Not in a TO s|
000012d0  75 62 72 6f 75 74 69 6e  65 0a 0a 20 20 20 54 68  |ubroutine..   Th|
000012e0  65 73 65 20 6d 65 73 73  61 67 65 73 20 72 65 66  |ese messages ref|
000012f0  6c 65 63 74 20 61 6e 20  65 72 72 6f 72 20 69 6e  |lect an error in|
00001300  20 65 69 74 68 65 72 20  74 68 65 20 75 73 65 72  | either the user|
00001310  73 20 70 72 6f 67 72 61  6d 20 6f 72 20 0a 74 68  |s program or .th|
00001320  65 20 73 74 61 74 65 6d  65 6e 74 20 6a 75 73 74  |e statement just|
00001330  20 74 79 70 65 64 20 69  6e 20 61 74 20 74 68 65  | typed in at the|
00001340  20 63 6f 6d 6d 61 6e 64  20 6c 69 6e 65 20 77 69  | command line wi|
00001350  6e 64 6f 77 2e 0a 0a 42  61 63 6b 67 72 6f 75 6e  |ndow...Backgroun|
00001360  64 20 45 78 65 63 75 74  69 6f 6e 0a 0a 20 20 20  |d Execution..   |
00001370  45 78 65 63 75 74 69 6f  6e 20 6f 66 20 6c 6f 67  |Execution of log|
00001380  6f 20 70 72 6f 67 72 61  6d 73 20 74 61 6b 65 73  |o programs takes|
00001390  20 70 6c 61 63 65 20 69  6e 20 74 68 65 20 62 61  | place in the ba|
000013a0  63 6b 67 72 6f 75 6e 64  20 28 76 69 61 20 0a 74  |ckground (via .t|
000013b0  68 65 20 77 69 6d 70 60  73 20 6e 75 6c 6c 20 72  |he wimp`s null r|
000013c0  65 61 73 6f 6e 20 63 6f  64 65 29 2c 20 62 75 74  |eason code), but|
000013d0  20 73 74 61 74 65 6d 65  6e 74 73 20 61 74 20 74  | statements at t|
000013e0  68 65 20 63 6f 6d 6d 61  6e 64 20 6c 69 6e 65 20  |he command line |
000013f0  0a 74 61 6b 65 20 6f 76  65 72 20 74 68 65 20 6d  |.take over the m|
00001400  61 63 68 69 6e 65 20 64  75 72 69 6e 67 20 74 68  |achine during th|
00001410  65 69 72 20 65 78 65 63  75 74 69 6f 6e 2e 54 68  |eir execution.Th|
00001420  69 73 20 69 73 20 6e 6f  74 20 6e 6f 72 6d 61 6c  |is is not normal|
00001430  6c 79 20 0a 6e 6f 74 69  63 65 61 62 6c 65 20 75  |ly .noticeable u|
00001440  6e 6c 65 73 73 20 79 6f  75 20 68 61 76 65 20 65  |nless you have e|
00001450  6e 74 65 72 65 64 20 63  6f 6d 6d 61 6e 64 73 20  |ntered commands |
00001460  77 68 69 63 68 20 77 69  6c 6c 20 74 61 6b 65 20  |which will take |
00001470  73 6f 6d 65 20 0a 74 69  6d 65 20 74 6f 20 65 78  |some .time to ex|
00001480  65 63 75 74 65 20 61 74  20 74 68 65 20 63 6f 6d  |ecute at the com|
00001490  6d 61 6e 64 20 6c 69 6e  65 2e 54 6f 20 73 74 6f  |mand line.To sto|
000014a0  70 20 61 20 63 6f 6d 6d  61 6e 64 20 64 75 72 69  |p a command duri|
000014b0  6e 67 20 69 74 73 20 0a  65 78 65 63 75 74 69 6f  |ng its .executio|
000014c0  6e 20 61 74 20 74 68 65  20 63 6f 6d 6d 61 6e 64  |n at the command|
000014d0  20 6c 69 6e 65 20 68 69  74 20 74 68 65 20 65 73  | line hit the es|
000014e0  63 61 70 65 20 6b 65 79  20 61 20 66 65 77 20 74  |cape key a few t|
000014f0  69 6d 65 73 0a 0a 52 75  6e 6e 69 6e 67 20 50 72  |imes..Running Pr|
00001500  6f 67 72 61 6d 73 0a 0a  20 20 20 50 72 6f 67 72  |ograms..   Progr|
00001510  61 6d 73 20 63 61 6e 20  62 65 20 72 75 6e 20 62  |ams can be run b|
00001520  79 20 65 69 74 68 65 72  20 74 79 70 69 6e 67 20  |y either typing |
00001530  60 52 55 4e 60 20 61 74  20 74 68 65 20 6c 6f 67  |`RUN` at the log|
00001540  6f 20 63 6f 6d 6d 61 6e  64 20 0a 6c 69 6e 65 20  |o command .line |
00001550  6f 72 20 62 79 20 63 6c  69 63 6b 69 6e 67 20 6f  |or by clicking o|
00001560  6e 20 52 55 4e 20 69 6e  20 74 68 65 20 70 72 6f  |n RUN in the pro|
00001570  67 72 61 6d 20 73 74 61  74 75 73 20 77 69 6e 64  |gram status wind|
00001580  6f 77 2e 54 68 69 73 20  0a 77 69 6e 64 6f 77 20  |ow.This .window |
00001590  63 61 6e 20 62 65 20 64  69 73 70 6c 61 79 65 64  |can be displayed|
000015a0  20 62 79 20 63 6c 69 63  6b 69 6e 67 20 6f 6e 20  | by clicking on |
000015b0  74 68 65 20 60 70 72 6f  67 72 61 6d 60 20 6f 70  |the `program` op|
000015c0  74 69 6f 6e 20 69 6e 20  0a 74 68 65 20 69 6e 74  |tion in .the int|
000015d0  65 72 70 72 65 74 65 72  73 20 6d 61 69 6e 20 6d  |erpreters main m|
000015e0  65 6e 75 20 74 72 65 65  2c 20 74 68 6f 75 67 68  |enu tree, though|
000015f0  20 74 68 69 73 20 73 68  6f 75 6c 64 20 6e 6f 74  | this should not|
00001600  20 6e 6f 72 6d 61 6c 6c  79 20 0a 62 65 20 6e 65  | normally .be ne|
00001610  63 65 73 73 61 72 79 2c  20 61 73 20 74 68 65 20  |cessary, as the |
00001620  69 6e 74 65 72 70 72 65  74 65 72 20 62 72 69 6e  |interpreter brin|
00001630  67 73 20 75 70 20 74 68  65 20 73 74 61 74 75 73  |gs up the status|
00001640  20 77 69 6e 64 6f 77 20  61 73 20 0a 73 6f 6f 6e  | window as .soon|
00001650  20 61 73 20 61 20 70 72  6f 67 72 61 6d 20 69 73  | as a program is|
00001660  20 6c 6f 61 64 65 64 2e  0a 0a 4f 76 65 72 68 65  | loaded...Overhe|
00001670  61 64 73 0a 0a 20 20 20  45 76 65 72 79 20 74 69  |ads..   Every ti|
00001680  6d 65 20 61 20 6c 6f 67  6f 20 63 6f 6d 6d 61 6e  |me a logo comman|
00001690  64 20 77 68 69 63 68 20  6d 6f 76 65 73 20 74 68  |d which moves th|
000016a0  65 20 74 75 72 74 6c 65  20 69 73 20 65 78 65 63  |e turtle is exec|
000016b0  75 74 65 64 2c 20 0a 74  68 65 20 69 6e 74 65 72  |uted, .the inter|
000016c0  70 72 65 74 65 72 20 62  72 6f 61 64 63 61 73 74  |preter broadcast|
000016d0  73 20 61 20 6d 65 73 73  61 67 65 20 6f 76 65 72  |s a message over|
000016e0  20 74 68 65 20 77 69 6d  70 20 6d 65 73 73 61 67  | the wimp messag|
000016f0  65 20 73 79 73 74 65 6d  20 0a 64 65 73 63 72 69  |e system .descri|
00001700  62 69 6e 67 20 74 68 65  20 63 6f 6d 6d 61 6e 64  |bing the command|
00001710  20 6a 75 73 74 20 65 78  65 63 75 74 65 64 2e 54  | just executed.T|
00001720  68 69 73 20 6d 65 73 73  61 67 65 20 77 69 6c 6c  |his message will|
00001730  20 6e 6f 72 6d 61 6c 6c  79 20 0a 62 65 20 69 6e  | normally .be in|
00001740  74 65 72 63 65 70 74 65  64 20 62 79 20 61 20 72  |tercepted by a r|
00001750  6f 62 6f 74 20 64 72 69  76 65 72 20 70 72 6f 67  |obot driver prog|
00001760  72 61 6d 20 77 68 69 63  68 20 77 69 6c 6c 20 69  |ram which will i|
00001770  6e 20 74 75 72 6e 20 6d  6f 76 65 20 0a 61 20 74  |n turn move .a t|
00001780  75 72 74 6c 65 20 61 72  6f 75 6e 64 2e 54 68 65  |urtle around.The|
00001790  20 66 6f 72 6d 61 74 20  6f 66 20 74 68 69 73 20  | format of this |
000017a0  6d 65 73 73 61 67 65 20  69 73 20 61 73 20 66 6f  |message is as fo|
000017b0  6c 6c 6f 77 73 20 3a 0a  0a 20 20 20 20 20 20 20  |llows :..       |
000017c0  20 57 69 6d 70 20 70 6f  6c 6c 20 63 6f 64 65 20  | Wimp poll code |
000017d0  31 37 20 28 75 73 65 72  20 6d 65 73 73 61 67 65  |17 (user message|
000017e0  29 0a 0a 20 20 20 6d 65  73 73 61 67 65 5f 62 6c  |)..   message_bl|
000017f0  6f 63 6b 21 31 36 3d 26  34 43 34 46 34 37 34 46  |ock!16=&4C4F474F|
00001800  20 20 20 20 20 20 20 20  28 22 4c 4f 47 4f 22 20  |        ("LOGO" |
00001810  69 6e 20 41 53 43 49 49  22 29 0a 20 20 20 6d 65  |in ASCII").   me|
00001820  73 73 61 67 65 5f 62 6c  6f 63 6b 21 32 30 3d 63  |ssage_block!20=c|
00001830  6f 6d 6d 61 6e 64 20 6e  75 6d 62 65 72 0a 20 20  |ommand number.  |
00001840  20 6d 65 73 73 61 67 65  5f 62 6c 6f 63 6b 2b 32  | message_block+2|
00001850  34 3d 6e 75 6d 65 72 69  63 20 73 74 72 69 6e 67  |4=numeric string|
00001860  20 63 6f 6e 74 61 69 6e  69 6e 67 20 61 20 70 61  | containing a pa|
00001870  72 61 6d 65 74 65 72 0a  20 20 20 20 20 20 20 20  |rameter.        |
00001880  20 20 20 20 20 20 20 20  20 20 20 20 74 6f 20 67  |            to g|
00001890  6f 20 77 69 74 68 20 74  68 65 20 63 6f 6d 6d 61  |o with the comma|
000018a0  6e 64 2e 0a 0a 20 20 20  54 68 65 20 63 6f 6d 6d  |nd...   The comm|
000018b0  61 6e 64 20 6e 75 6d 62  65 72 73 20 61 72 65 20  |and numbers are |
000018c0  61 73 20 66 6f 6c 6c 6f  77 73 20 3a 0a 20 20 0a  |as follows :.  .|
000018d0  20 20 20 20 20 20 20 20  20 31 2e 20 46 6f 72 77  |         1. Forw|
000018e0  61 72 64 20 20 20 28 74  68 65 20 70 61 72 61 6d  |ard   (the param|
000018f0  65 74 65 72 20 69 73 20  74 68 65 20 64 69 73 74  |eter is the dist|
00001900  61 6e 63 65 29 0a 20 20  20 20 20 20 20 20 20 32  |ance).         2|
00001910  2e 20 42 61 63 6b 20 20  20 20 20 20 28 74 68 65  |. Back      (the|
00001920  20 70 61 72 61 6d 65 74  65 72 20 69 73 20 74 68  | parameter is th|
00001930  65 20 64 69 73 74 61 6e  63 65 29 0a 20 20 20 20  |e distance).    |
00001940  20 20 20 20 20 33 2e 20  4c 65 66 74 20 20 20 20  |     3. Left    |
00001950  20 20 28 74 68 65 20 70  61 72 61 6d 65 74 65 72  |  (the parameter|
00001960  20 69 73 20 74 68 65 20  61 6e 67 6c 65 20 69 6e  | is the angle in|
00001970  20 64 65 67 72 65 65 73  29 0a 20 20 20 20 20 20  | degrees).      |
00001980  20 20 20 34 2e 20 52 69  67 68 74 20 20 20 20 20  |   4. Right     |
00001990  28 74 68 65 20 70 61 72  61 6d 65 74 65 72 20 69  |(the parameter i|
000019a0  73 20 74 68 65 20 61 6e  67 6c 65 20 69 6e 20 64  |s the angle in d|
000019b0  65 67 72 65 65 73 29 0a  20 20 20 20 20 20 20 20  |egrees).        |
000019c0  20 35 2e 20 50 65 6e 75  70 20 20 20 20 20 28 6e  | 5. Penup     (n|
000019d0  6f 20 70 61 72 61 6d 65  74 65 72 29 0a 20 20 20  |o parameter).   |
000019e0  20 20 20 20 20 20 36 2e  20 50 65 6e 44 6f 77 6e  |      6. PenDown|
000019f0  20 20 20 28 6e 6f 20 70  61 72 61 6d 65 74 65 72  |   (no parameter|
00001a00  29 0a 20 20 20 20 20 20  20 20 20 37 2e 20 50 65  |).         7. Pe|
00001a10  6e 43 6f 6c 6f 75 72 20  28 74 68 65 20 70 61 72  |nColour (the par|
00001a20  61 6d 65 74 65 72 20 69  73 20 74 68 65 20 63 6f  |ameter is the co|
00001a30  6c 6f 75 72 20 30 2d 31  36 29 0a 0a 20 20 20 55  |lour 0-16)..   U|
00001a40  73 69 6e 67 20 74 68 69  73 20 6d 65 73 73 61 67  |sing this messag|
00001a50  65 73 20 74 68 65 20 61  70 70 6c 69 63 61 74 69  |es the applicati|
00001a60  6f 6e 20 21 52 6f 62 6f  74 20 77 69 6c 6c 20 62  |on !Robot will b|
00001a70  65 20 61 62 6c 65 20 74  6f 20 0a 64 72 69 76 65  |e able to .drive|
00001a80  20 66 6c 6f 6f 72 20 74  75 72 74 6c 65 73 20 76  | floor turtles v|
00001a90  69 61 20 61 20 6c 6f 67  6f 20 70 72 6f 67 72 61  |ia a logo progra|
00001aa0  6d 20 6f 72 20 63 6f 6d  6d 61 6e 64 73 20 61 74  |m or commands at|
00001ab0  20 74 68 65 20 6c 6f 67  6f 20 0a 63 6f 6d 6d 61  | the logo .comma|
00001ac0  6e 64 20 6c 69 6e 65 2e  50 72 65 73 65 6e 74 6c  |nd line.Presentl|
00001ad0  79 20 74 68 65 20 21 52  6f 62 6f 74 20 70 72 6f  |y the !Robot pro|
00001ae0  67 72 61 6d 20 6f 6e 6c  79 20 64 69 73 70 6c 61  |gram only displa|
00001af0  79 73 20 6d 65 73 73 61  67 65 73 20 0a 72 65 63  |ys messages .rec|
00001b00  65 69 76 65 64 20 69 6e  20 69 74 73 20 77 69 6e  |eived in its win|
00001b10  64 6f 77 73 2c 20 62 75  74 20 49 20 68 61 76 65  |dows, but I have|
00001b20  20 6c 65 66 74 20 69 74  20 65 61 73 69 6c 79 20  | left it easily |
00001b30  61 6c 74 65 72 61 62 6c  65 20 0a 28 6a 75 73 74  |alterable .(just|
00001b40  20 66 69 6c 6c 20 69 6e  20 74 68 65 20 62 6c 61  | fill in the bla|
00001b50  6e 6b 20 70 72 6f 63 65  64 75 72 65 73 29 20 73  |nk procedures) s|
00001b60  6f 20 74 68 61 74 20 49  20 63 61 6e 20 6d 61 6b  |o that I can mak|
00001b70  65 20 69 74 20 64 72 69  76 65 20 0a 76 61 72 69  |e it drive .vari|
00001b80  6f 75 73 20 62 75 67 67  79 60 73 20 61 6e 64 20  |ous buggy`s and |
00001b90  66 6c 6f 6f 72 20 74 75  72 74 6c 65 73 20 61 74  |floor turtles at|
00001ba0  20 61 20 6c 61 74 65 72  20 64 61 74 61 2e 0a 0a  | a later data...|
00001bb0  43 6f 6d 6d 65 6e 74 73  20 69 6e 73 65 72 74 65  |Comments inserte|
00001bc0  64 20 69 6e 74 6f 20 70  72 6f 67 72 61 6d 73 0a  |d into programs.|
00001bd0  0a 20 20 20 20 20 20 59  6f 75 20 63 61 6e 20 69  |.      You can i|
00001be0  6e 73 65 72 74 20 61 6e  79 20 63 6f 6d 6d 65 6e  |nsert any commen|
00001bf0  74 20 79 6f 75 20 6c 69  6b 65 20 69 6e 20 79 6f  |t you like in yo|
00001c00  75 72 20 41 53 43 49 49  20 74 65 78 74 20 0a 70  |ur ASCII text .p|
00001c10  72 6f 67 72 61 6d 20 66  69 6c 65 20 61 66 74 65  |rogram file afte|
00001c20  72 20 61 20 60 2f 60 20  63 6f 6d 6d 61 6e 64 2e  |r a `/` command.|
00001c30  54 68 69 73 20 63 6f 6d  6d 61 6e 64 20 62 65 68  |This command beh|
00001c40  61 76 65 73 20 6a 75 73  74 20 6c 69 6b 65 20 0a  |aves just like .|
00001c50  42 41 53 49 43 60 73 20  52 45 4d 20 63 6f 6d 6d  |BASIC`s REM comm|
00001c60  61 6e 64 2e 0a 20 20 20  52 65 6d 65 6d 62 65 72  |and..   Remember|
00001c70  20 74 68 61 74 20 61 66  74 65 72 20 79 6f 75 72  | that after your|
00001c80  20 63 6f 6d 6d 65 6e 74  20 73 74 69 6c 6c 20 70  | comment still p|
00001c90  75 74 20 69 6e 20 61 20  60 3a 60 20 63 68 61 72  |ut in a `:` char|
00001ca0  61 63 74 65 72 20 0a 6f  72 20 61 20 72 65 74 75  |acter .or a retu|
00001cb0  72 6e 20 63 6f 64 65 2c  20 74 6f 20 73 65 70 61  |rn code, to sepa|
00001cc0  72 61 74 65 20 69 74 20  66 72 6f 6d 20 74 68 65  |rate it from the|
00001cd0  20 6e 65 78 74 20 73 74  61 74 65 6d 65 6e 74 2e  | next statement.|
00001ce0  54 68 65 20 73 61 6d 65  20 0a 67 6f 65 73 20 66  |The same .goes f|
00001cf0  6f 72 20 74 68 65 20 73  74 61 74 65 6d 65 6e 74  |or the statement|
00001d00  20 62 65 66 6f 72 65 20  79 6f 75 72 20 63 6f 6d  | before your com|
00001d10  6d 65 6e 74 2e 0a 0a 54  68 65 20 62 61 73 69 63  |ment...The basic|
00001d20  20 6c 6f 67 6f 20 63 6f  6d 6d 61 6e 64 73 0a 0a  | logo commands..|
00001d30  46 6f 72 77 61 72 64 20  3c 64 69 73 74 61 6e 63  |Forward <distanc|
00001d40  65 3e 20 4d 6f 76 65 73  20 79 6f 75 72 20 74 75  |e> Moves your tu|
00001d50  72 74 6c 65 20 66 6f 72  77 61 72 64 20 74 68 65  |rtle forward the|
00001d60  20 64 69 73 74 61 6e 63  65 20 0a 73 70 65 63 69  | distance .speci|
00001d70  66 69 65 64 20 62 79 20  79 6f 75 20 69 6e 20 74  |fied by you in t|
00001d80  68 65 20 70 61 72 61 6d  65 74 65 72 20 66 6f 6c  |he parameter fol|
00001d90  6c 6f 77 69 6e 67 20 69  74 2e 0a 0a 42 61 63 6b  |lowing it...Back|
00001da0  20 3c 64 69 73 74 61 6e  63 65 3e 20 4d 6f 76 65  | <distance> Move|
00001db0  73 20 74 68 65 20 74 75  72 74 6c 65 20 62 61 63  |s the turtle bac|
00001dc0  6b 20 3c 64 69 73 74 61  6e 63 65 3e 20 75 6e 69  |k <distance> uni|
00001dd0  74 73 0a 0a 4c 65 66 74  20 3c 61 6e 67 6c 65 3e  |ts..Left <angle>|
00001de0  20 54 75 72 6e 73 20 74  68 65 20 74 75 72 74 6c  | Turns the turtl|
00001df0  65 20 61 6e 74 69 2d 63  6c 6f 63 6b 77 69 73 65  |e anti-clockwise|
00001e00  20 74 68 72 6f 75 67 68  20 3c 61 6e 67 6c 65 3e  | through <angle>|
00001e10  20 0a 64 65 67 72 65 65  73 0a 0a 52 69 67 68 74  | .degrees..Right|
00001e20  20 3c 61 6e 67 6c 65 3e  20 54 75 72 6e 73 20 74  | <angle> Turns t|
00001e30  68 65 20 74 75 72 74 6c  65 20 63 6c 6f 63 6b 77  |he turtle clockw|
00001e40  69 73 65 20 74 68 72 6f  75 67 68 20 3c 61 6e 67  |ise through <ang|
00001e50  6c 65 3e 20 64 65 67 72  65 65 73 0a 0a 50 65 6e  |le> degrees..Pen|
00001e60  55 70 20 20 20 54 65 6c  6c 73 20 74 68 65 20 69  |Up   Tells the i|
00001e70  6e 74 65 72 70 72 65 74  65 72 20 6e 6f 74 20 74  |nterpreter not t|
00001e80  6f 20 64 72 61 77 20 6c  69 6e 65 73 0a 0a 50 65  |o draw lines..Pe|
00001e90  6e 44 6f 77 6e 20 54 65  6c 6c 73 20 74 68 65 20  |nDown Tells the |
00001ea0  69 6e 74 65 72 70 72 65  74 65 72 20 74 6f 20 64  |interpreter to d|
00001eb0  72 61 77 20 6c 69 6e 65  73 20 77 68 65 6e 20 74  |raw lines when t|
00001ec0  68 65 20 74 75 72 74 6c  65 20 6d 6f 76 65 73 0a  |he turtle moves.|
00001ed0  0a 50 65 6e 43 6f 6c 6f  75 72 20 3c 63 6f 6c 6f  |.PenColour <colo|
00001ee0  75 72 3e 20 54 65 6c 6c  73 20 74 68 65 20 69 6e  |ur> Tells the in|
00001ef0  74 65 72 70 72 65 74 65  72 20 74 6f 20 64 72 61  |terpreter to dra|
00001f00  77 20 74 68 65 20 6c 69  6e 65 73 20 69 6e 20 0a  |w the lines in .|
00001f10  63 6f 6c 6f 75 72 20 3c  63 6f 6c 6f 75 72 3e 20  |colour <colour> |
00001f20  20 20 0a 48 6f 6d 65 20  20 20 20 4d 6f 76 65 73  |  .Home    Moves|
00001f30  20 74 68 65 20 74 75 72  74 6c 65 20 62 61 63 6b  | the turtle back|
00001f40  20 74 6f 20 69 74 73 20  68 6f 6d 65 20 70 6f 73  | to its home pos|
00001f50  69 74 69 6f 6e 20 61 6e  64 20 61 6e 67 6c 65 0a  |ition and angle.|
00001f60  0a 53 65 74 48 6f 6d 65  20 54 61 6b 65 73 20 74  |.SetHome Takes t|
00001f70  68 65 20 63 75 72 72 65  6e 74 20 70 6f 73 69 74  |he current posit|
00001f80  69 6f 6e 20 61 6e 64 20  61 6e 67 6c 65 20 74 6f  |ion and angle to|
00001f90  20 62 65 20 74 68 65 20  74 75 72 74 6c 65 73 20  | be the turtles |
00001fa0  0a 68 6f 6d 65 20 70 6f  73 69 74 69 6f 6e 20 61  |.home position a|
00001fb0  6e 64 20 61 6e 67 6c 65  0a 0a 43 6c 65 61 72 20  |nd angle..Clear |
00001fc0  20 20 43 6c 65 61 72 73  20 74 68 65 20 6c 6f 67  |  Clears the log|
00001fd0  6f 20 64 69 73 70 6c 61  79 20 77 69 6e 64 6f 77  |o display window|
00001fe0  20 74 6f 20 74 68 65 20  64 65 66 61 75 6c 74 20  | to the default |
00001ff0  77 68 69 74 65 0a 0a 52  65 53 74 61 72 74 20 52  |white..ReStart R|
00002000  65 73 65 74 73 20 74 68  65 20 65 6e 74 69 72 65  |esets the entire|
00002010  20 6c 6f 67 6f 20 64 69  73 70 6c 61 79 20 28 6e  | logo display (n|
00002020  6f 74 20 74 68 65 20 70  72 6f 67 72 61 6d 20 72  |ot the program r|
00002030  75 6e 6e 69 6e 67 29 0a  0a 41 6e 67 6c 65 20 3c  |unning)..Angle <|
00002040  64 65 67 72 65 65 73 3e  20 53 65 74 73 20 74 68  |degrees> Sets th|
00002050  65 20 74 75 72 74 6c 65  60 73 20 61 6e 67 6c 65  |e turtle`s angle|
00002060  20 74 6f 20 3c 64 65 67  72 65 65 73 3e 0a 52 75  | to <degrees>.Ru|
00002070  6e 20 20 20 54 65 6c 6c  73 20 74 68 65 20 69 6e  |n   Tells the in|
00002080  74 65 72 70 72 65 74 65  72 20 74 6f 20 62 65 67  |terpreter to beg|
00002090  69 6e 20 65 78 65 63 75  74 69 6e 67 20 74 68 65  |in executing the|
000020a0  20 63 75 72 72 65 6e 74  6c 79 20 0a 6c 6f 61 64  | currently .load|
000020b0  65 64 20 6c 6f 67 6f 20  74 65 78 74 66 69 6c 65  |ed logo textfile|
000020c0  20 70 72 6f 67 72 61 6d  0a 0a 20 20 20 4d 6f 73  | program..   Mos|
000020d0  74 20 6c 6f 67 6f 20 63  6f 6d 6d 61 6e 64 73 20  |t logo commands |
000020e0  68 61 76 65 20 6d 69 6e  69 6d 75 6d 20 61 62 62  |have minimum abb|
000020f0  72 65 76 69 61 74 69 6f  6e 73 2c 20 77 68 69 63  |reviations, whic|
00002100  68 20 63 61 6e 20 6d 61  6b 65 20 0a 70 72 6f 67  |h can make .prog|
00002110  72 61 6d 20 65 6e 74 72  79 20 65 61 73 69 65 72  |ram entry easier|
00002120  2e 4d 61 6e 79 20 6e 75  6d 65 72 69 63 20 70 61  |.Many numeric pa|
00002130  72 61 6d 65 74 65 72 73  20 63 61 6e 20 68 61 76  |rameters can hav|
00002140  65 20 0a 6d 61 74 68 65  6d 61 74 69 63 61 6c 20  |e .mathematical |
00002150  65 78 70 72 65 73 73 69  6f 6e 73 20 75 73 65 64  |expressions used|
00002160  20 69 6e 20 70 6c 61 63  65 20 6f 66 20 6a 75 73  | in place of jus|
00002170  74 20 6e 75 6d 62 65 72  73 20 74 68 6f 75 67 68  |t numbers though|
00002180  20 0a 76 61 72 69 61 62  6c 65 73 20 61 72 65 20  | .variables are |
00002190  6e 6f 74 20 73 75 70 70  6f 72 74 65 64 20 63 75  |not supported cu|
000021a0  72 72 65 6e 74 6c 79 2e  41 6c 73 6f 20 6e 6f 74  |rrently.Also not|
000021b0  65 20 74 68 61 74 20 74  68 65 20 6c 65 74 74 65  |e that the lette|
000021c0  72 20 0a 63 61 73 65 20  6f 66 20 74 68 65 20 63  |r .case of the c|
000021d0  6f 6d 6d 61 6e 64 73 20  64 6f 73 65 6e 60 74 20  |ommands dosen`t |
000021e0  6d 61 74 74 65 72 2c 20  74 68 65 20 69 6e 74 65  |matter, the inte|
000021f0  72 70 72 65 74 65 72 20  77 69 6c 6c 20 0a 72 65  |rpreter will .re|
00002200  63 6f 67 6e 69 73 65 20  74 68 65 20 63 6f 6d 6d  |cognise the comm|
00002210  61 6e 64 20 65 69 74 68  65 72 20 77 61 79 2e 0a  |and either way..|
00002220  0a 54 6f 20 66 69 6e 64  20 6f 75 74 20 61 20 63  |.To find out a c|
00002230  6f 6d 6d 61 6e 64 73 20  61 62 62 72 65 76 69 61  |ommands abbrevia|
00002240  74 69 6f 6e 20 75 73 65  20 74 68 65 20 68 65 6c  |tion use the hel|
00002250  70 20 77 69 6e 64 6f 77  20 0a 28 61 76 61 69 6c  |p window .(avail|
00002260  61 62 6c 65 20 62 79 20  63 6c 69 63 6b 69 6e 67  |able by clicking|
00002270  20 6f 6e 20 68 65 6c 70  20 69 6e 20 74 68 65 20  | on help in the |
00002280  69 6e 74 65 72 70 72 65  74 65 72 73 20 6d 61 69  |interpreters mai|
00002290  6e 20 6d 65 6e 75 20 0a  74 72 65 65 29 2e 4f 6e  |n menu .tree).On|
000022a0  63 65 20 74 68 65 20 77  69 6e 64 6f 77 20 69 73  |ce the window is|
000022b0  20 64 69 73 70 6c 61 79  65 64 20 63 6c 69 63 6b  | displayed click|
000022c0  20 6f 6e 20 74 68 65 20  63 6f 6d 6d 61 6e 64 20  | on the command |
000022d0  79 6f 75 20 77 61 6e 74  20 0a 74 6f 20 6b 6e 6f  |you want .to kno|
000022e0  77 20 61 62 6f 75 74 2e  0a 0a 44 65 62 75 67 67  |w about...Debugg|
000022f0  69 6e 67 20 79 6f 75 72  20 70 72 6f 67 72 61 6d  |ing your program|
00002300  0a 0a 20 20 20 44 65 62  75 67 67 69 6e 67 20 61  |..   Debugging a|
00002310  20 6c 6f 67 6f 20 70 72  6f 67 72 61 6d 20 69 73  | logo program is|
00002320  20 6d 61 69 6e 6c 79 20  75 70 20 74 6f 20 74 68  | mainly up to th|
00002330  65 20 75 73 65 72 2c 20  68 6f 77 65 76 65 72 20  |e user, however |
00002340  74 68 65 20 0a 70 65 72  63 65 6e 74 61 67 65 20  |the .percentage |
00002350  64 69 73 70 6c 61 79 20  69 6e 20 74 68 65 20 70  |display in the p|
00002360  72 6f 67 72 61 6d 20 73  74 61 74 75 73 20 77 69  |rogram status wi|
00002370  6e 64 6f 77 2c 20 63 6f  6e 73 74 61 6e 74 6c 79  |ndow, constantly|
00002380  20 0a 75 70 64 61 74 65  64 20 77 68 69 6c 73 74  | .updated whilst|
00002390  20 61 20 70 72 6f 67 72  61 6d 20 69 73 20 72 75  | a program is ru|
000023a0  6e 2c 20 77 69 6c 6c 20  69 6e 64 69 63 61 74 65  |n, will indicate|
000023b0  20 74 68 65 20 70 65 72  63 65 6e 74 61 67 65 20  | the percentage |
000023c0  0a 74 68 72 6f 75 67 68  20 74 68 65 20 70 72 6f  |.through the pro|
000023d0  67 72 61 6d 73 20 74 65  78 74 66 69 6c 65 2c 20  |grams textfile, |
000023e0  74 68 65 20 63 6f 6d 6d  61 6e 64 20 77 68 65 72  |the command wher|
000023f0  65 20 74 68 65 20 65 72  72 6f 72 20 0a 6f 63 63  |e the error .occ|
00002400  75 72 72 65 64 20 77 61  73 20 61 66 74 65 72 20  |urred was after |
00002410  74 68 65 20 62 75 67 20  69 73 20 72 65 61 63 68  |the bug is reach|
00002420  65 64 2e 0a 0a 20 20 20  49 20 68 61 76 65 20 66  |ed...   I have f|
00002430  6f 75 6e 64 20 61 20 63  6f 6d 6d 6f 6e 20 73 6f  |ound a common so|
00002440  75 72 63 65 73 20 6f 66  20 65 72 72 6f 72 73 20  |urces of errors |
00002450  69 6e 20 70 72 6f 67 72  61 6d 73 20 61 72 65 20  |in programs are |
00002460  65 69 74 68 65 72 20 0a  6d 69 73 74 79 70 65 64  |either .mistyped|
00002470  20 63 6f 6d 6d 61 6e 64  73 20 28 67 65 6e 65 72  | commands (gener|
00002480  61 74 69 6e 67 20 60 4e  6f 20 73 75 63 68 20 73  |ating `No such s|
00002490  75 62 72 6f 75 74 69 6e  65 60 29 20 61 6e 64 20  |ubroutine`) and |
000024a0  6d 69 73 73 69 6e 67 20  0a 73 65 70 61 72 61 74  |missing .separat|
000024b0  6f 72 73 20 62 65 74 77  65 65 6e 20 73 74 61 74  |ors between stat|
000024c0  65 6d 65 6e 74 73 20 28  67 65 6e 65 72 61 74 69  |ements (generati|
000024d0  6e 67 20 60 42 61 64 20  4c 6f 67 6f 20 70 61 72  |ng `Bad Logo par|
000024e0  61 6d 65 74 65 72 60 29  2e 0a 20 0a 0a           |ameter`).. ..|
000024ed