Genre: | Utility; LOGO Style Language |
Publisher: | Software Projects |
Cover Art Language: | English |
Machine Compatibility: | BBC Model B, BBC Model B+, BBC Master 128, Acorn Electron |
Release: | Professionally released on Cassette |
Available For: | BBC/Electron |
Compatible Emulators: | BeebEm (PC (Windows)) PcBBC (PC (MS-DOS)) Model B Emulator (PC (Windows)) Elkulator 1.0 (PC (Windows)) |
Original Release Date: | 20th June 1985 |
Original Release Price: | £7.99 |
Market Valuation: | £2.50 (How Is This Calculated?) |
Item Weight: | 64g |
Box Type: | Cassette Single Plastic Clear |
Author(s): | Steve Sherratt |
There are 0 other items 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 following programs are provided:
Assuming PGL is loaded in your micro.
Type RESET (RETURN)
Type LOAD CROSS (RETURN)
Press the PLAY button on the tape recorder and press RETURN
When the program has loaded and the colon prompt returns, Type GO (RETURN)
Similarly you could type LOAD ROBOT to load the ROBOT program in etc.
Pressing ESCAPE will stop a PGL program running.
Pressing BREAK clears all the computer's memory returning you to BASIC.
Typing HELP (RETURN) lists all the commands available in PGL.
Typing BYE (RETURN) clears the memory, returning you to BASIC.
Typing RESET (RETURN) reclaims all the memory available for the PGL program - this includes old PGL programs that you have in memory.
A command may be typed in when the prompt and flashing cursor are shown on the screen. The PGL prompt is a colon (:), as opposed to the prompt in BASIC. Certain characters are not allowed in PGL eg. "£$%!~^" are illegal, you will find that pressing these keys will have no effect. Both upper and lower case characters will be printed as uppercase.
The maximum length of a command line is one screen line. When this is approached a beep' will be heard, and no more characters will be accepted from the keyboard (with the exception of the DELETE and RETURN keys).
Each command is entered into the computer by pressing the RETURN key.
When a command line is entered, all the spaces are removed from it. Thus spaces may be typed in where desired to aid readability.
Lines entered that exceed 24 characters in length, after the spaces have been removed, will be cut to this size. Thus long commands should take advantage of the keyword abbreviations that PGL offers (e.g. FORWARD = FD etc.).
The orange keys at the top of the keyboard have been set to hold various definitions for use in the GRAPHICS mode as "doodle" keys. Thus by simply pressing the appropriate key an action will be performed.
Key number | Definition |
0 | Screen Clear |
1 | Centre |
2 | Left 45 |
3 | Right 45 |
4 | Pen Up |
5 | Pen Down |
6 | Forward 5 |
7 | Forward 10 |
8 | Forward 20 |
9 | Show |
An Explanation Of The Use Of Three PGL Modes - Command, Graphics and Edit
Command Mode:
This is the text screen display on which information such as HELP, LISTings and STATUS is displayed.
Graphics Mode:
This screen provides a drawing area of 320 x 208 points. The drawing position being set at the centre of this area when the GRAPHICS command is issued. There is a 6 line command window below this.
It is possible to use the drawing region in 'immediate mode' commands may be entered and executed immediately - see also the above notes on the doodle' keys. The only restriction on immediate mode execution is that loops and jumps to labels may not be used.
Edit Mode: the program editor allows you to write upto 11 separate programs/sub-routines for execution in the graphics mode. Each of these programs may contain upto 50 lines of code. Programs are allowed to CALL each other, so the maximum lines per program should not prove to be a restriction.
It will be assumed that you have just loaded the PGL program, if not then type RESET. Type in GRAPHICS.
Type SHOW - this displays your current drawing position and direction. This command is useful to use if your ever lose your drawing point or direction.
Type in the following commands line by line - if you're not sure where you are, or what effect one of the commands has had, then use the SHOW command.
FORWARD 30
RIGHT 90
FORWARD 30
RIGHT 90
FORWARD 30
RIGHT 90
FORWARD 30
RIGHT 90
Similarly, BACK 30 would make you draw backwards 30 dots, and LEFT 90, would make you turn LEFT by 90 degrees.
PGL Example: Drawing A Square In Immediate Mode Using Relative Co-Ordinates
Type in GRAPHICS, and then type in the commands. Again if you're not sure where you are, or what's happening type in "SHOW".
DRAW 0,30
DRAW 30,0
DRAW 0,-30
DRAW-30,0
Similarly, MOVE 0,30 would move you across the screen, but no line would be drawn.
PGL Exampe: Drawing A Square In Immediate Mode Using Absolute Co-Ordinates
Type in GRAPHICS, followed by these commands:
ADRAW 190,103
ADRAW 190,133
ADRAW 160,133
ADRAW 160,103
Similarly, AMOVE 190,103 would move you to that point on the screen, but no line will be given.
For a grid-map of the absolute co-ordinates on the graphics screen, see the explanation of the ADRAW command.
PGL Example: Drawing A Square Using The Program
First read the section on EDIT at the back of the manual.
Now follow the commands over, exactly as written, the "[RET]" indicates when you should press the RETURN key. If you get beeps when you attempt to type in a command, then you need to press the RETURN key once more.
EDIT SQUARE [RET]
The current SQUARE program is now displayed on the screen. Note that the first line in the program displays the name of the program, and the last shows the end of the program.
[RET]
REPEAT 4 [RET] [RET]
FORWARD 30 [RET] [RET]
RIGHT 90 [RET] [RET]
NEXT [RET] [RET]
We have now inserted the program, so we go to the GRAPHICS mode, and execute it. To do this, type in the following commands:
GRAPHICS [RET]
CALL SQUARE [RET]
PGL Example: Editing The Square Program To Draw A Hexagon
Suppose we now wish to change our SQUARE program so that it makes a hexagon of side length 20.
Type in the following commands exactly as shown, remember [RET] means press the RETURN key, and [DELETE] means press the delete key.
EDIT SQUARE [RET]
The previous SQUARE program is now displayed on the screen.
[DELETE] [RET]
REPEAT 6 [RET]
[DELETE] [RET]
FORWARD 20 [RET]
[DELETE] [RET]
RIGHT 60 [RET] [RET]
The listing on the screen should now appear as:
* SQUARE
REPEAT 6
FORWARD 20
RIGHT 60
NEXT
* END
Now type in GRAPHICS and CALL SQUARE as before.
PGL Example: Parameter Passing To A Program
Using the editor, create the following program:
* POLYGON
REPEAT SIDES
FORWARD 20
RIGHT 360/SIDES
NEXT* END
Now change to the GRAPHICS mode, and type in the following:
SET SIDES = 8
CALL POLYGON
Try setting the value of SIDES to different values, and see what effects take place. Can you see how you could alter the length of each SIDE by changing the program slightly, and setting another variable?
PGL Example: Getting A Program To Call Another
The following example assumes that you still have the POLYGON program in memory exactly as shown above. Enter the following program using the editor.
* ROTATE
SET SIDES =
REPEAT 36
CALL POLYGON
RIGHT 10
NEXT
* END
Now go to the GRAPHICS mode and type in CALL ROTATE. Can you see how to alter the shape that is being rotated?
Memory Allocation Within The PGL System
Approximately 6K of memory remains free for the user within PGL. This memory is used to store declared variables, and the PGL programs. A tokenized system is used to store the programs, and all spaces are removed frorn input lines, this ensures that program storage space is kept to a minimum.
It should be noted that extensive editing of programs will use up more memory than is actually required.
When the amount of free memory drops below the 800 byte level, insertions into programs are no longer allowed, so as to protect the working environment.
Due to the nature of string allocation in memory in BBC basic, deleting program lines and programs will NOT release the memory areas allocated.
When the free memory is under 800 bytes, programs may still is under 800 bytes, programs may still be run, but if the free memory drops below 100 bytes during the run, then the program will be aborted.
One way of reclaiming memory is to save the current programs to tape, type in the RESET command, and then load the programs off the tape, back into memory. Thus space that was previously wasted during editing is no longer tied up.
Remember also that the variables previously declared have also been deleted from the memory by the RESET.
Example Of Program Tokenization
1. PGL listing - ZAP1
1. | * ZAP1 | |ZAP1 |
2. | FORWARD X | 6X! |
3. | FORWARD X | 6X! |
4. | RIGHT 90 | 990! |
5. | SET X=-0.5 | OX!X-0.5 |
6. | TEXT X<0 | JX<0! |
7. | IF T JUMP *END | KT!END |
8. | JUMP *ZAP1 | LZAP1! |
9. | * END | |END! |
End of listing - ZAP1
In these notes "****" is used to represent character output, and "££££" is used to represent a numerical output.
BAD COLOUR - an attempt was made to make the screen colour the same as the current pen colour, or vice versa.
BAD COMMAND - a command was entered that was not understood by the current PGL mode.
BAD EXPRESSION - this message is given when a numerical value cannot be evaluated from the expression given. Common causes of this are: dividing numbers by zero, using a variable name that has not yet been given a value, and using illegal variable names.
BAD LABEL - a command line that should contain a label has a bad label, the label is usually missing!
BAD NAME - this results from a mistake in a SET command. Either the variable name on the left of the expression is too short or too long or the expression after the '=' sign is missing.
BAD PROGRAM NAME - when a program is CALLed in the immediate mode, and there is no program in memory with that name.
CAN'T FIND PROG. **** - when a program is CALLed by another program, and this program does not exist.
COPY ABORTED - this is issued when there is not enough free memory available to completely copy the contents of the first program into the second.
ERROR- ££££ LOOP(S) NOT CLOSED - The number shown indicates how many REPEAT loops did not have corresponding NEXT statements when the end of the top level program was reached.
ESCAPE PRESSED - this indicates that the escape key has been pressed.
EXTRA - **** - the input line contained extra unnecessary data. The command was not executed.
LABEL **** IN **** AT LINE ££££ - ajump to the label had to be made at this point in the program, but the label doesn't exist. Remeinber jumps can only be made to labels within the same program.
MAX CALLS EXCEEDED - an attempt was made to make a 22nd nested CALL. PGL allows a maximum of 21 nested CALLs. The CALL has been ignored.
MAX LOOPS EXCEEDED - an attempt to execute a 22nd nested LOOP was made. PGL allows a maximum of 21 nested loops. The REPEAT command is ignored.
MAXIMUM NUMBER OF PROGRAMS IN USE - the memory contains 11 programs already; no new program may be used until one of the others has been deleted. PGL supports 11 concurrent programs/subroutines.
MAXIMUM PROGRAM LENGTH - the program currently being edited contains 50 lines of code. No more lines may be entered into the program. If more than this number of lines is required, the CALLs to other programs should be made.
MISSING DATA - a command was entered that required more information, thus the command was ignored.
PROGRAM ERROR ££££ AT ££££- if the error was not caused by trying to load a file off tape that was not a PGL program, then PGL contains a serious program error - please report this !!!!!
WARNING - MEMORY LOW - this indicates that there is little room left in memory to add moe programs. The edit mode will not allow any more insertion of code into programs if the message occurs frequently.
Please read the section about PGL MEMORY for information about reclaiming memory.
An Alphabetical List Of PGL Commands And Their Abbreviations
*
ADRAW (ADR)
AMOVE (AMV)
ANGLE (AN)
BACK (BK)
BYE
CALL (CL)
CAT
CENTRE (CT)
COMMAND (COM)
COPY
DELETE
DRAW (DR)
DUMP
EDIT (E)
FILLOU (FF)
FILLON (FN)
FORWARD (FD)
GO
GRAPHICS (G)
GRID
HARDCOPY
HELP (?)
IF
JUMP* (J*)
LEFT (LT)
LIST (LI)
LOAD
MOVE (MV)
NEXT (N)
ORIGIN (OR)
PAUSE (PA)
PEN (PE)
PRINT (PT)
REPEAT (RPT)
RESET
RIGHT (RT)
SAVE
SCREEN (SC)
SET (/)
SHOW (SH)
STATUS (ST)
TEST (T)
TOP (@)
VALUE (V)
WAITKEY (WK)
BLACK, BLUE, CYAN, GREEN, MAGENTA, RED, WHITE, YELLOW
CLEAR
DOWN, ERASE, INVERSE, UP
BYE
CALL +
CAT
COMMAND
EDIT
GRAPHICS
HARDCOPY
HELP
LIST
GO
RESET
SET +
STATUS
+ N.B. These commands will be inserted into a program during editing. In other modes they will be executed immediately.
Commands Exclusively For Use In The Command And Graphics Mode
COPY, DELETE, LOAD, SAVE
Commands For Direct Useage In The Graphics Mode, And For Insertion Into Programs During Edit Mode
ADRAW
AMOVE
ANGLE
BACK
CENTRE
DRAW
DUMP
FILLOFF
DILLON
FORWARD
GRID
LEFT
MOVE
ORIGIN
PAUSE
PEN
PRINT
RIGHT
SCREEN
SHOW
TEST
VALUE
WAITKEY
Additional Commands For Insertion Into Programs
*
IF
JUMP*
REPEAT
NEXT
Command Exclusive To The Edit Mode
TOP
Explanation Of Keyword Descriptives
[colour] may be any one of the following:
RED, CYAN, GREEN, BLUE, YELLOW, BLACK, MAGENTA, WHITE
[conditions] may be any logical sentence that can be evaluated as being either TRUE or FALSE. It may be created in terms of numbers and variables, in conjunction with the following logical operators:
<, >, <>, <=, >=, AND, OR EOR NOT, or any combination of these.
e.g
X=23
SCALE>90
(Y=3 AND X=7 OR ST>9 etc.
Any condition that may be created in BASIC may be utilized in PGL, providing that it will fit on a PGL line.
[filename] this may be a series of letters and numbers upto 6 characters in length. Any characters over this will be lost.
[label] may be any combination of characters, but at least I character long. Remember that any spaces will be removed from your labels.
[numeric expression] may be any sentence, that can be evaluated to a number. It may include variables that you have defined, numbers, and any arithmetical functions allowed in BASIC. eg. 29
FRED
FRED*29+2
SIDE/9-6
RND(3)+SIN(FRED) etc.
[pen action] may be any one of:
UP, DOWN, ERASE, INVERSE
[program name] see [label].
[variable name] may be any sequence of letters and digits upto 6 characters in length providing that (1) the first character is not a letter, and (2) the name is not a BASIC keyword, or contains a BASIC keyword as part of the name.
Legal variable names:
FRED
ST1234
X
SIDES
Illegal variable names:
SQUARESIDE
(More than 6 characters long)
2NDONE
(First character is a number)
REPEAT
(BASIC keyword)
LENGTH
(LEN is a BASIC keyword)
The full list of BASIC keywords can be found in the User Guide
PGL Keyword Definitions
The * command allows you to place labels and comments into your programs. Note that there are always at least two labels in a program, the first and last lines. The first specifies the program's name, and the last shows the end of the program. eg.
* DEMO1
* LABEL
* THIS-IS-A-COMMENT
* END 56i8l [program name]
[program name]
[program comment]
[last line in the program]
It is possible for you to JUMP froin one part of your program, to wherever you have a label within that program.
Associated keywords:
JUMP* IF
ADRAW
Syntax :ADRAW [numeric expression 1], [numeric expression 2]
Allows you to draw, in the current drawing action, from your current drawing position, to an ABSOLUTE point on the graphics screen.
Every point, so that you can always move to where you want to be on the screen. These points are as follows:
Note that the first number is the column number (left to right) across the screen (O to 320), and the second number is the height number (up and down) the screen (0 to 208).
The CENTRE point of the screen, i.e. the point at which you always enter the graphics mode is 160,203.
Once the command has been executed, this point becomes your new drawing point.
Examples
ADRAW 160,103
ADRAW 0,0
ADRAW X+5,100
Associated keywords:
AMOVE, DRAW, MOVE
AMOVE
Syntax :AMOVE [numeric expression 1], [numeric expression 2]
This allows you to move from your current drawing point, to an absolute screen reference point without any drawing taking place.
(See the description of ADRAW for more information about. the absolute co-ordinate layout.)
This new position becomes the new drawing point.
Examples:
AMOVE 30*X,100
AMOVE X,Y
AMOVE 0,0
Associated Keywords:
ADRAW, DRAW, MOVE
ANGLE
Syntax :ANGLE [numeric expression]
This sets the drawing direction of the pen, on the graphics screen, to the number of degrees specified.
0 degrees is vertically upwards on the screen
90 degrees is to the right-hand side
180 degrees is vertically downwards
270 degrees is to the left-hand side
360 degrees is vertically upwards again.
(360 degrees = 0 degrees)
If the value of th expression is outside the range 0–359 degrees, then it is automatically converted to a value within the range, eg.-90 = 270, 362 = 2, 675 = 315 etc.
BACK
Syntax : BACK[numeric expression]
This makes the pen draw, in the current drawing action, a distance backwards on the screen. Backwards is taken to mean in the opposite (180 degrees), direction to the current drawing angle.
Examples:
BACK 10
BACK DIST+3*SCALE
Associated keywords:
FORWARD
BYE
Syntax : BYE
This exits the PGL language, losing any PGL programs currently in memory, and returns the user to BASIC.
Associated keywords:
RESET
CALL
Syntax: CALL [program name]
On execution, the screen mode will be changed to the GRAPHICS screen, if this mode is not already displayed. PGL then runs the named program. It is perfectly legal for one program to call another, or even itself, eg.
PGL remembers where each program is called from, so that it can return to that point, when it has finished executing the called subroutine.
A maximum of 21 nested calls may be made. If a 22nd call is made, then it will be ignored, and program execution will jump on the next line.
Examples
CALL CIRCLES
CALL ROUTINE
Associated keywords:
GO
CAT
Syntax : CAT
This allows you to look at the names of programs you have stored on a tape, without having to leave PGL.
The program names are listed when found, along with the size of each program. Any file preceded by an arrow () or a square bracket (1) is a PGL program, and may be loaded if desired.
To stop the cataloguing of tapes, the ESCAPE key should be pressed.
Example CAT
Associated keywords:
STATUS
CENTRE
Syntax: CENTRE
This moves the pen to the drawing centre of the screen. This point will be the centre of the drawing area, if not changed by the ORIGIN command. No line is drawn from the old pen point to the screen centre, unless the FILL option is ON, in which case lines may appear.
Associated keywords:
ORIGIN
COMMAND
Syntax : COMMAND
This sets up the text screen on which listings, status and help information are displayed. Note that when the LIST, STATUS and HELP commands are issued, the mode will automatically change to command,
Associated Keywords:
EDIT, GRAPHICS
COPY
Syntax: COPY [program name 1], [program name 2]
This copies the contents of [program name 1], with the exception of the program name, and stores them in [program name 2]. If there were statements previously in [program name 2] then these are erased.
[program name 2] is automatically created, if it does not already exist, and providing that there is enough room to create a new program.
Examples:
COPY OLDPROG-NEWPROG
COPY GO, MAIN
Associated Keywords:
DELETE
DELETE
Syntax : DELETE [program name]
This deletes the named program from memory. If [program name] isn't 'GO' then [program name] is also decatalogued.
Note that the memory space allocated to the program number is not released by this action, but is reserved for the next new program.
Examples
DELETE SQUARE
DELETE GO
Associated keywords:
COPY
DRAW
Syntax : DRAW [numeric expression 1], [numeric expression 2]
This allows you to draw, in the current drawing action, from your current drawing position, to another point, by the use of relative co-ordinates.
This draws a line from the current drawing point, to a new point which is 10 units left of the current position, and 20 units above it.
This draws a line from the old drawing point, to a new point that is 10 units to the right, and 30 units down, relative to the old position.
Examples
DRAW 0,SCALE*3
DRAW-X-50
DRAW RND(10),RND(X)
Associated keywords:
ADRAW, AMOVE, MOVE
DUMP
Syntax : DUMP
This calls the machine code routine in memory at location &D00, to print the drawing area of the graphics screen on the printer. N.B. The program only supports dumps for use on EPSON printers.
If no printer is connected when he DUMP command is issued, then the computer will hangup until either a printer (of the appropriate type), is connected, or the BREAK key is pressed. N.B. Pressing the BREAK key will reset the whole of the computer's memory.
Associated keywords:
HARDCOPY
EDIT
Syntax : EDIT [program name]
On execution of the edit command, the edit screen will be shown on the screen, and the program to be edited will be displayed.
The green bar across the screen indicates the point at which new program lines may be inserted. The program line below the green bar is the one which will be deleted, when the DELETE key is pressed.
The up and down arrow keys allow you to move your program up and down around the bar, so that lines may be inserted and deleted from the chosen place.
The screen display is thus split into two main sections, (1) where the program is displayed, and (2) where commands may be typed in for execution, and insertion into the program.
If there is no colon prompt (:), and flashing cursor in the command area, then the up/down arrows and delete key are activated, to enable command entry press the RETURN key. Pressing any other key will emit a 'beep'. The cursor keys are automatically re-enabled after a line has been entered into the program. So to continually add lines to a program, in the same place, the RETURN key must be pressed once more after you have entered each line.
A maximum of 11 programs may be used in the memory at one time, each program may be upto 50 lines in length.
Examples
EDIT POLYGON
EDIT GO
Associated keywords:
COMMAND, GRAPHICS
FILLON
Syntax: FILLON
This allows triangular filling to take place. Any subsequent drawing or moving commands will fill a triangular shape based upon the last two points VISITED and the current position.
N.B. That the CENTRE and MOVE commands will cause filling to take place. To avoid this, filling should be switched off using FILLOFF before the move, and then switched back on again afterwards.
FILLOFF
Syntax : FILLOFF
This cancels the triangular filling effect caused by the FILLON command.
Associated keywords:
FILLON
FORWARD
Syntax : FORWARD [numeric expression]
This makes the pen draw across the screen, in the current drawing action, in the direction of the drawing angle, by the number of units specified.
Examples
FORWARD-X+RND(P)
FORWARD 33
FORWARD-8
Associated keywords:
BACK
GO
Syntax: GO
The screen mode will change to the graphics screen, if this is not already displayed. Execution of the program 'GO' then begins. Note that this command is equivalent to the command CALL GO, except that in edit mode, the CALL statement will be placed into the program, whereas GO will be executed straight away.
Associated keywords:
CALL
GRAPHICS
Syntax : GRAPHICS
This command creates the graphics screen for drawing, and executing programs on. The drawing area is cleared for use, the pen positioned at the centre of the drawing area, PEN DOWN is activated, and the FILL mode is set to OFF. The drawing angle is set to 0 degrees. Any text in the command window is cleared.
Associated Keywords:
COMMAND, EXIT
GRID
Syntax:GRID
This command places a grid of squares onto the screen. Each square is 10 screen units in length. Its purpose is to give a sense of scale to the drawing area, thus improving estimates of distance to move across the screen. Typing "GRID" again will remove the squares, and leave your original drawing intact.
Example
GRID
HARDCOPY
Syntax : HARDCOPY [program name]
This lists the named program to the screen, and also to the printer. The computer will hangup if no printer is attached, and this command is issued, until either a printer is attached, or the BREAK key is pressed.
Note that if a listing will not fit completely on the screen, then a page at a time will be displayed on the screen. In order to view the next part of the listing press the SHIFT key.
Examples
HARDCOPY CIRCLES
HARDCOPY MAIN
Associated Keywords:
DUMP, LIST
HELP
Syntax: HELP
This will list all the commands in PGL and their abbreviations, followed by a list of the screen/pen colours and screen/pen actions.
IF
Syntax:
IF T JUMP* [label]
IF F JUMP* [label]
This command allows you to change the flow of execution of statements in a program depending on whether a condition is fulfilled or not.
The truth condition, generated by the last TEST condition, is compared with the truth value in the IF statement (T or F). If the values are the same, ie. both true or both false, then a jump is made to the program line containing the named label, else the program continues to the next line.
eg. * LABEL
SET X=X+1
TEST X<>10 END
IF T JUMP* LABEL
eg.
TEST ANG<10+SIDE
IF F JUMP* END
Examples
IF T JUMP* BEGINNING
IF F JUMP* AGAIN
Associated Keywords:
JUMP*, TEST
JUMP*
Syntax : JUMP* [label]
Jump allows you to jump to a point contained within a program, that contains the label specified. Execution then continues from this point, as opposed to the next line in the program. eg.
* AGAIN
SET NUM=NUM+RND(6)
JUMP* AGAIN
The program runs through normally until it reaches JUMP* AGAIN. Instead of executing the next line, the program goes back to the point where the label *AGAINoccurs, and executes normally from that point onwards.
eg. JUMP* FORWARDLABEL
It is also possible to jump forward in a program, thus missing out* FORWARDLABEL lines.
Examples
JUMP* GO
JUMP* LABEL2
Associated Keywords:
*, IF
LEFT
Syntax :LEFT [numeric expression]
This turns the current drawing angle to the left by the number of degrees specified, eg. If the current drawing angle is 190 degrees, and we execute a LEFT 145 then the new drawing direction is 45 degrees. (190–145=45).
Examples:
LEFT 310, LEFT-24, LEFT 7*ANG
Associated Keywords:
ANGLE, RIGHT
LIST
Syntax : LIST [program name]
Provides a listing of the named program, line by line. Each line is given a number, to reference its position within the program. If the listing is too large to fit on the screen in one go, then one page at a time will be displayed. To see the next page, press the SHIFT key.
Examples
LIST SPIRAL2
LIST TREE
Associated Keywords:
HARDCOPY
LOAD
Syntax : LOAD [filename]
This loads a program file that has previously been saved to tape.
This erases any programs currently in the memory. The program file name will be echoed to the screen when found.
Examples
LOAD DEMO1
LOAD PROGS
LOAD
Associated keywords:
SAVE
MOVE
Syntax : MOVE [numeric expression 1], [numeric expression 2]
Allows you to move from your current drawing point, to another point on the screen, without drawing by the use of relative co-ordinates. eg. MOVE 29,50
Examples
MOVE 0,X+2
MOVE RND(10),ABS(Y)+9
Associated keywords :
ADRAW, AMOVE, DRAW
NEXT
Syntax : NEXT
This is used to enclose the list of commands that are to be repeated in a REPEAT ... NEXT loop. Every REPEAT statement must have a corresponding NEXT statement within each program. It is not possible to have the REPEAT statement in the calling program, and the NEXT statement in the called program.
Associated keywords:
REPEAT
ORIGIN
Syntax : ORIGIN
Remembers the current drawing position, so that whenever the CENTRE command is issued, the PEN returns to this point. The point is originally set by the GRAPHICS command to the centre of the drawing area.
Associated keywords:
CENTRE
PAUSE
Syntax : PAUSE [numeric expression]
This makes the program pause, for a delay proportional to the value of the expression given, before it goes on to the next line in the program. A screen message is issued when the PAUSE effect is in operation.
Examples
PAUSE 1000
PAUSE NUM*100
Associated keywords:
WAITKEY
PEN
Syntax:PEN [colour]
PEN [pen action]
When a colour is specified, this changes the drawing colour of the pen to the colour issued, providing that this isn't the current screen background colour.
PEN UP - means that lines will not appear on the screen when any movement takes place. The pen will move to the appropriate points, but drawing will be invisible. This command may be used to move across the screen using the FORWARD, BACK and DRAW facilities without any drawing taking place.
PEN DOWN - makes any subsequent drawing be in the drawing (pen) colour.
PEN ERASE - drawing will be done in the screen background colour. This is useful for deleting lines.
PEN INVERSE - makes the drawing colour appear as the opposite of the previous drawing area colour; the part of a line that crosses the screen background colour will appear in the screen background colour.
Examples
PEN UP
PEN BLACK
Associated keywords:
SCREEN
PRINT
Syntax:
PRINT [characters]
PRINT
When used with characters, this command displays the text starting at the current graphics drawing position, on the graphics screen. The new drawing position becomes the point in the top right corner of the last character.
As PGL removes spaces from command lines to save storage space, typing "PRINT HELLO THERE" will be converted to: "PRINT HELLO THERE"
To get around this problem, the slash character (/) will be printed as a space when this command is executed.
Thus typing "PRINT HELLO/THERE" will appear with a space in, and not a slash.
"PRINT THE INVISIBLE MAN"
appears as THEINVISIBLEMAN
"PRINT THE/INVISIBLE/MAN"
appears as THE INVISIBLE MAN
The "PRINT" on its own, will change the drawing position, to the first point on the next screen line down. This is useful when it is desired to start a sentence at the very left side of the screen.
Examples
PRINT ROBBIE/THE/ROBOT
PRINT 22/MAIN/STREET
PRINT HELLO
PRINT 1234567890+*_=
PRINT Associated keywords:
VALUE
REPEAT
Syntax : REPEAT [numeric expression]
The REPEAT .... NEXT structure allows you to make the computer execute a series of statements a numer of times. The number of times is specified by the value of numeric expression.
eg.
REPEAT 4
FORWARD 10
RIGHT 90
NEXT
is equivalent to:
FORWARD 10
RIGHT 90
FORWARD 10
RIGHT 90
FORWARD 10
RIGHT 90
FORWARD 10
RIGHT 90
Note that a REPEAT ... NEXT loop is always executed at least once, even if the value in [numeric expression] is less than 1.
JUMPing out of REPEAT loops is bad programming style, and may cause error messages when other loops are encountered.
REPEAT ... NEXT loops may be nested to a depth of 21 levels.
Examples
REPEAT NUM*2
REPEAT 360-X
Associated keywords:
NEXT
RESET
Syntax: RESET
This resets the PGL program, any programs contained within memory will be lost, all available memory is reclaimed for use.
RIGHT
Syntax : RIGHT [numeric expression]
This turns the current drawing angle to the right by the number of degrees specified. eg. If the current drawing angle is 180 degrees, and we execute a RIGHT 45 then the new drawing direction is 225 degrees. (180+45=225).
Examples
RIGHT ANG*2
RIGHT-59
Associated Keywords:
ANGLE, LEFT, SHOW
SAVE
Syntax: SAVE [filename]
Saves all the programs currently in memory to tape, under the given file name.
Examples
SAVE DATA1
SAVE GARDEN
Associated Keywords:
LOAD
SCREEN
Syntax:
SCREEN [colour]
SCREEN CLEAR
SCREEN CLEAR clears the drawing area of the graphics screen. NB. This does not alter the current drawing action, fill mode, CENTRE position, or pen position!
SCREEN followed by a colour changes the background colour of the graphics screen to that specified, providing the colour is not the current pen colour.
Examples
SCREEN BLUE
SCREEN CLEAR
Associated keywords:
PEN
SET
Syntax: SET [variable name] = [numeric expression]
This evaluates the value of [numeric expression] and stores the result in the variable specified.
WARNING: Variable names that contain BASIC keywords are illegal!!!!
Examples
SET SIZE=20
SET X=RND (8)+X
SET ANG=SIN(X)* 100+10+A
SHOW
Syntax : SHOW
This prints out the current value of the drawing angle in whole degrees, and displays a flashing triangle which indicates the drawing position, and the drawing direction, for about 5 seconds.
NB. If the current drawing point is off the screen, then the triangle will not be visible.
STATUS
Syntax: STATUS
This provides a list of all the programs currently in memory, by name, along with the number of program lines in each. The total number of lines is also displayed, as is the amount of free memory left in bytes.
TEST
Syntax: TEST [condition]
This evaluates a condition as being either True (T) or False (F). The result of the test is stored and used in any subsequent IF statements. The result remains in memory until either a GRAPHICS command is issued, setting the value to True (T), or another TEST is performed.
Examples
TEXT X<35
TEST RND(6)<>6
TEST X=3 OR X=4
Associated keywords:
IF
TOP
Syntax: TOP
Used in edit mode to re-enable the cursor and delete keys. It is used as a dummy command to allow program manipulation around the insertion bar, when the RETURN key has been pressed by mistake.
VALUE
Syntax : VALUE [numeric expression]
VALUE evaluates the [numeric expression] to a number, and then prints it at the current drawing position, on the graphics screen. The new graphics position becomes the point in the top right corner of the last digit.
Examples
VALUE 23+10
VALUE X*(Y-5)+5
VALUE SIN(X)
Associated keywords:
PRINT
WAITKEY
Syntax : WAITKEY
This stops program execution until a key on the keyboard is pressed.
Associated Keywords: PAUSE
PGL requires a BBC model B computer with 32K memory and a series 1.0 O.S. or Electron.
Type CHAIN "PGL" or CHAIN ", the press RETURN.
After a few seconds the title page will be displayed.
The main program will then load.
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.