|Genre:||Utility; Logo Language|
|Cover Art Language:||English|
|Machine Compatibility:||BBC Model B|
|Release:||Professionally released on Cassette|
|Available For:||BBC Model B|
|Compatible Emulators:||BeebEm (PC (Windows))|
PcBBC (PC (MS-DOS))
Model B Emulator (PC (Windows))
|Original Release Date:||13th June 1984|
|Original Release Price:||£9.20|
|Market Valuation:||£2.50 (How Is This Calculated?)|
|Box Type:||Cassette Single Plastic Clear|
There is 1 other item featuring this same game (that we know about!). Click any of them for their details.
Unfortunately no-one is currently selling this item.
Worried you're being ripped off? Closing prices on eBay can help you decide what a reasonable price is for a particular item.
The language LOGO was originally designed to teach the concept that a computer will always obey the commands it is given, provided that they are of the correct form and syntax. This powerful implementation of LOGO can support loops, definitions, subroutines, recursive programming etc, and has many additional useful and novel features.
For this reason it provides an excellent start for anyone wishing to learn the art of computer programming and a useful stepping stone to other more complicated high and low level languages.
Note: In the following text the marks "I will surround all text to be typed at the keyboard or any text appearing on the screen and the [RETURN] sign within these marks will denote the pressing of the RETURN key.
To load the program type 'NEW [RETURN]' and then 'CHAIN "LOGO" [RETURN]'. The program only takes a couple of minutes to load and when it is loaded the message:
MODE (0,1,2,4 OR 5)
will be printed on the screen. You now have to enter the graphics mode in which the program is to operate. For the following examples mode two is used, so type:
Now the screen will display the triangular turtle in the centre, a border and a prompt (?) at the bottom-left.
Try the following commands:
FORWARD 300 (RETURN)
RIGHT 90 (RETURN)
The first part of each line (ie. FORWARD or RIGHT) is called the COMMAND and the second part after the space (ie. 300 or 90) is called the ARGUMENT. As can be seen from this example, when the command FORWARD is typed the TURTLE moves forward through a distance which is proportional to the ARGUMENT it is given; in the first example it moves forward 300 screen units. (NB. The screen is approximately 1280 units across and 850 units down.) In the second example it turns right 90 degrees (a right angle). In fact the argument after the space may be any valid BASIC expression such as 360/7, RND (5), 2*28-14. Try typing in the above commands but using different arguments and try using the opposite commands to the two outlined above, namely BACKWARD and LEFT respectively.
Try typing the following:
These commands draw a square on the screen by sending the turtle forward 300 units and right 90 degrees four times. This is unnecessarily tedious as the two commands are repeated four times and it could easily be shortened by using a repeat command.
REPEAT 4, FORWARD 300: R1 90 (RETURN)
This command has two arguments (separated by the comma). The first is the number of times the commands are to be repeated and the second is the string of commands separated by colons. There is no limit to the number of commands which can be typed after the comma but each MUST be separated by a colon and may NOT be a second REPEAT command.
Nearly all of the LOGO commands have an abbreviated form which can be used for speed of program entry. (Refer to the quick reference guide for a summary of all commands and their abbreviations.)
(Note: The language assumes that if the first part of a line matches one of the LOGO commands then that command is the one intended (e.g. if 'LOGO' is typed the command 'LOAD' will be assumed).
So far, as soon as you have pushed return after typing a line, the computer has obeyed the line immediately. This is called programming in direct mode.
It is possible, however, to make the computer store the commands you type in its memory and only to execute them when you tell it to. To do this you have to give the computer a NAME under which the instructions will be stored and then the instructions in order. When you wish to execute the instructions you simply type the NAME you have given them and the computer will execute them one after the other.
Try the following:
TO SQUARE (RETURN)
The TO command tells the computer that we are about to define a WORD. The argument (SQUARE) is the NAME of the WORD we are going to define.
When you have done this you will notice that the screen clears and the name (SQUARE) and a number are printed at the top of the screen. The number is the number that the computer has given to the WORD you are defining (you can have up to 10 words defined at any one time, numbered 1 to 10). The screen will also display a '1:' at the top left, this means that it is waiting for the first command. Try the following:
REPEAT 4, FORWARD 200:RIGHT 90 [RETURN]
The 'END' statement means that you have finished the command list for the word SQUARE and after you have typed this the screen will revert to its usual display of the turtle.
It is easy to see which words have been defined within the LOGO by typing 'LIST [RETURN]'. The screen will then display all of the WORD names and their numbers in order. If you wish to see the list of commands under a certain name simply type 'LIST name' where name is the name of the WORD. Try:
and the commands you have just typed under SQUARE will be listed on the screen. To get the computer to execute the command simply type -
and the computer will draw a square.
It is possible to rectify any mistakes made in the definition of WORD. The command used to edit an existing word is simply:
EDIT name [RETURN]
where 'name' is the name of the word you wish to change. When you have typed this the screen will display the name at the top and it will print out the first command at the top of the screen. If you wish to change this command simply type in the correction underneath (using the cursor keys to copy parts of the original line as required). If you do not want to change this command simply press "RETURN'. The computer will continue to offer each command in turn for changing until an 'END' statement is reached or typed in as a correction.
When you have defined a word you can save it on cassette tape or disk for retrieval when you next need it. To save the commands under a word type:
SAVE name [RETURN]
where 'name' is the name of the WORD to be saved. The computer will ask you to 'RECORD then RETURN' as it does in BASIC and the WORD will be saved on tape.
To retrieve a WORD saved on tape simply type:
LOAD name [RETURN]
where 'name' has the same meaning as above. The computer will search through the tape until it finds the correct word which it will then load.
DELETE name [RETURN]
will make the computer forget the WORD with the name of 'name' and all the commands under it. Typing -
DELETE ALL [RETURN]
will delete all the WORDS from the computer's memory and restart the program so that it asks for a MODE.
A variable can be likened to a letterbox in which the computer stores a number. This letterbox is labelled by a name which you give it. For example, you have to store the number 100 in a variable and you want to call the variable AMOUNT, you would type -
MAKE AMOUNT = 100 [RETURN]
This assigns the value of 100 to the variable called AMOUNT. You can use the number in the letterbox labelled AMOUNT instead of the number 100. For example you could now type:
FORWARD AMOUNT [RETURN]
RIGHT AMOUNT [RETURN]
The real use of a variable is that its value can be varied. In the example above we defined the new word SQUARE. However it will only draw a square of the stated size. To define a word that would cater for any size squares you may wish to draw, the following definition would do this.
DELETE SQUARE [RETURN] (This deletes the old definition TO SQUARE)
REPEAT 4, FORWARD SIZE:RIGHT 90 [RETURN]
Now instead of always going 200 units forward the turtle will move the number of units set by the variable SIZE.
MAKE SIZE=100 [RETURN]
will draw a square of size 100. Therefore it is only necessary to change the value of the variable outside the definition to draw squares of different sizes. The following definition (LOTS) will draw a series of ever growing squares. (This assumes the last SQUARE definition has already been entered).
TO LOTS [RETURN]
MAKE SIZE=50 [RETURN]
REPEAT 10, SQUARE:MAKE SIZE=SIZE+10 [RETURN]
There is no limit to the number of variables you can have in a program but all variables must obey the rules for numeric variables in BASIC (see the USER GUIDE p. 24-26) and in addition they must be no longer than 20 characters and no shorter than 3 characters.
The system variables are the variables which are used by the LOGO program itself. Most of the names of these are two characters long so that you cannot change them within LOGO. Some however have been made longer than two characters so that you may use them within the program. The next page describes these system variables.
COLOR When the turtle moves it will leave a line behind it if the pen is down. The colour of this line is controlled by the variable COLOR.
The value of this variable is equivalent to the second argument of the GCOL Command in BASIC (See p. 262 in the USER GUIDE). Some legal examples of the use of this variable are:
MAKE COLOR=1 [RETURN]
MAKE COLOR=COLOR+1 [RETURN]
MAKE COLOR=YELLOW [RETURN]
DEFAULT VALUE = 7
This variable changes the colour in which the triangular turtle is plotted (See COLOR).
This variable controls the condition under which the line drawn by the turtle is plotted. (See first argument of GCOL p. 262 in the USER GUIDE). Possible conditions are AND, OR, EOR and INVERT.
As for COND but controlling the condition with which the turtle is plotted. If the following is entered the turtle will leave an impression of itself on the screen as it moves off:
MAKE TCOND=0 [RETURN]
MAKE TCOND=3 [RETURN]
The size of the turtle (from centre totip in screen units). is given by this variable. DEFAULT VALUE = 80
The colours BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE and FLASH have the values 0-8 respectively and can be used in commands eg.
MAKE COLOR=YELLOW [RETURN]
MAKE TCOLOR=YELLOW +1 [RETURN]
FORWARD GREEN [RETURN]
The following routine draws a square, the size of which is set by the variable 'SIZE'.
TO SQUARE [RETURN]
FORWARD SIZE:RIGHT 90 [RETURN]
However a much more flexible routine follows that will draw a polygon with any number of sides set by the variable 'SIDES'
TO POLY [RETURN]
REPEAT SIDES, FORWARD SIZE:RIGHT 360/SIDES [RETURN]
Try the above routine with various values for the variable 'SIDES'. 3 will draw a triangle, 4 will draw a square, 5 a pentagon etc. You will notice that with about 20 sides the polygon becomes indistinguishable from a circle, so one might define a circle as:
TO CIRCLE [RETURN]
REPEAT 20, FO SIZE:RIGHT 18 [RETURN]
The following routine (WAVE) is actually made up of two half circles. This is best in graphics Mode 4. If you are not already using this Mode then typing DELETE ALL will delete all the current words and will give you the option of changing modes.
TO WAVE [RETURN]
REPEAT 10,FO SIZE:RI 18 [RETURN]
REPEAT 10,FO SIZE:LE 18 [RETURN]
Once the above has been typed in try this:
TO SQIGGLE [RETURN]
MAKE AMOUNT=0 [RETURN]
REPEAT 20, HOME:RI AMOUNT:WAVE:MAKE AMOUNT=AMOUNT+18 [RETURN]
This takes some time to draw the complete picture because the wave routine is made up of so many short lines. While in Mode 4, try the following.
TO TWIST [RETURN]
REPEAT 50, FO SIZE:RI 135:MAKE SIZE=SIZE +10
The following routines will draw the same pattern as on the front of the LOGO 2 cassette. These are quite complex and make use of the system variables in places. Type in all three routines EYES, PATTERN and PUPILS. This also requires a SQUARE routine that draws square with sides 200 long.
TO PATTERN [RETURN]
REPEAT 36,RI 10:F0 50:SQUARE [RETURN]
TO EYES [RETURN]
FO 100 [RETURN]
LEFT 90 [RETURN]
FO 500 [RETURN]
RI 90 [RETURN]
MOVE 400,600 [RETURN]
MAKE TCOND=0 [RETURN]
MOVE 950,600 [RETURN]
MAKE TCOND=3 [RETURN]
MOVE 675,200 [RETURN]
MAKE TSIZE=180 [RETURN]
RI 180 [RETURN]
Now typing 'EYES' will draw the complete pattern. Again this takes some time as this is quite an intricate pattern. The following routines use colour and so should be done in Mode 2.
TO CTWIST [RETURN]
MAKE SIZE=50 [RETURN]
MAKE COLOR=1 [RETURN]
REPEAT 100,FO SIZE:RI 73:MAKE SIZE=SIZE+5:MAKE COLOR=COLOR+1:IF COLOR]5,MAKE COLOR=1 [RETURN]
This also uses the IF statement. Every time it draws a line it increases the colour, IF the colour is greater that 5 then it resets it to color 1 again.
TO STAR [RETURN]
MAKE TCOND=0 [RETURN]
RI 180 [RETURN]
MAKE TCOND=3 [RETURN]
This draws a solid star, again it makes use of system variables. Having typed the 'STAR' routine try the following.
TO SOLID [RETURN]
MAKE TCOLOR=1 [RETURN]
MAKE TSIZE=900 [RETURN]
REPEAT 15,STAR:MAKE TSIZE=TSIZE-60:MAKE TCOLOR=TCOLOR+1 [RETURN]
Most error messages that appear when using LOGO2 are self explanatory. For example "NO SUCH WORD" will be printed when you try to delete a non existent word. However a few will occur that are no So obvious.
NO SUCH NUMBER
This will occur when LOGO 2 encounters a variable that has not had a value assigned to it. It is easy to check if a variable has been asigned a number by typing 'OUTPUT NAME where NAME is the name of the variable.
TOO FEW NUMBERS
This will be printed when a command is not followed by as many numbers as it expects, for example the BEEP command must have 3 numbers after it.
This occurs when defined words are calling too many defined words - that is they are nested to a depth greater than 10.
I DON'T KNOW
If no word follows this statement it probably means a command was preceded by a space. This also occurs when a colon follows a REPEAT command when a comma should.
NO WORD SPACE
Only 10 new words are allowed in LOGO 2, trying to define more than this number will cause this error.
Lifts the turtles pen off the 'paper' so that all subsequent movements do not draw lines.
Puts the turtles 'pen' down onto the paper' so that subsequent movements of the turtle will leave a line on the screen.
RIGHT X (RI)
Turns the turtle right by x degrees.
LEFT X (LE)
Turns the turtle left by X degrees.
FORWARD X (FO)
Moves the turtle forward by X screen units. Will draw a line if the pen is down.
BACKWARD X (BA)
Moves the turtle back by X screen units. Will draw a line if the pen is down.
MOVE X,Y (MO)
Moves the tutle to the absolute screen position X units along the horizontal and Yunits up the vertical. Draws a line if the pen is down.
Makes the turtle disappear
Makes the turtle re-appear
BEEP X,Y,Z (BE)
Makes a sound of volume X (0-15), pitch Y (0-255) and length (0-255) in 20th of a second.
Clears the whole screen and centres the turtle turning it to face up the screen.
Returns the turtle to the centre facing up the screen.
MAKE X=Y (MA)
Assigns the value Y to variable X. e.g. MAKE SIZE=200: FO SIZE
OUTPUT X (OU)
Prints the value (whole numbers only) of the variable or number X at the bottom of the screen.
REDIFINE X,Y (RED)
Makes all traces of colour X on the screen change to colour Y. (i.e. redefines a colour) See VDU19 in the BBC User Guide
Sets all colours back to their original definitions.
Prints the following string X at the current turtle position. Does nothing in command mode but when used in the definition of a word it indicates the end of that definition. Can also be used to indicate a conditional END in conjuction with the IF statement. e.g. IF X= 4, END
REPEAT X,Y (REP)
X is the number of times they string of commands is to be repeated. Each command should be separated by a colon and must not be another REPEAT command.
IF X,Y (IF)
If X is true then do Y. X is a condition (e.g. HELLO=100) and Y is a command (e.9. FORWARD 100) e.g. IF SIZE=100,MAKE SIZE=20 or IF XPOS=200,FORWARD 300
Define word X
LIST (X) (LIST)
Without an argument this will print all defined words. With Xit will list the commands under word X
EDIT X (EDIT)
Change the definition of word X. Each command line will be offered in turn if 'RETURN' is pressed then that line will remain the same. If new commands are typed in then the command line will be changed to the new line.
DELETE X (DELETE)
Makes the computer forget the definition of the word X.
SAVE X (SAVE)
Saves the definition of the word X onto tape.
Loads word X in from tape.
Tape: CHAIN"" (RETURN)
The following utilities are also available to allow you to edit the supplied screens of this game:
We thank you from the bottom of our hearts if you report something wrong on our site. It's the only way we can fix any problems!
You are not currently logged in so your report will be anonymous.
Change the country to update it. Click outside of this pop-up to cancel.
If you auction an item, it will no longer show in the regular shop section of the site.
You are not currently logged in. To post a comment, please Register or Log In.