Why not send the Electron fans among your family and friends an Electronic Christmas card?
This program creates a lovely graphic display to the accompaniment of some festive tunes and gently falling snow. There's even a snowman and a Christmas tree decorated with colourful fairy lights.
Of course you'll want to personalise your card. Line 40 holds the key. Place your name in from$ and the recipient's in to$.
When the card has been drawn, pressing the Q key will switch the carols off. S will switch them back on.
Assembles a short machine code routine to play the carols
Draws the snow
Defines the characters
Prints a bell
Moves the snow be redefining the colours
GET SET SANTA
By Stephen Martin
To stop all the good (?) little children of the world seeing what gifts they will receive before Christmas, Santa hid them all in a vast maze.
During the long summer months some extremely crafty characters have gained illegal entry into the maze and are having a wonderful time playing with presents they don't deserve.
You have to guide Santa through the maze and collect the presents.
But be careful. There is no telling what the frustrated little fiends will do to Santa if they get hold of him!
Number of keys left to collect
Location holding the start address of the maze segment currently being printed in the window
Location of man in maze
X coordinate of man
Y coordinate of man
Maximum distance scrolling can continue right
Maximum distance of downwards scrolling
Minimum distance scrolling can continue left
Minimum distance of upwards scrolling
Number of lives left
Holds top ten names
Holds top ten scores
Pokes in machine code
Moves man up and scrolls
Moves man down and scrolls
Moves man left and scrolls
Moves man right and scrolls
Updates the number of keys left and increases score
Sets up the screen display
Lose a life. All gone? Hiscore?
Prints high score table
Pokes in the maze
Sets up memory locations used
Calls the machine code and updates your man until you are dead
Name input routine (uses OSWORD with A=0)
Congratulations and increment level
Note: The BREAK key definition is corrupted because I have used the page of memory allocated to the function key definitions. Press ESCAPE after BREAK or CTRL-BREAK at the same time then OLD (RETURN) to enable normal editing. Type in the data carefully otherwise you may have an impossible game.
MISSILE ATTACK is a version of the popular arcade game in which you must destroy incoming missiles with your laser bases.
If enough missiles get through - five or more - your city is destroyed and you along with it.
If you clear one screen you do to another with more and faster missiles and fewer shots with your lasers.
The program is run mainly in Mode 4 for speed but still uses colour and sound to good effect. The top ten hi-scores are displayed at the end of each game.
The program uses integer variables to increase speed. For this reason REM statements are also omitted.
The number of missiles can be changed by altering the value of N% at line 410 and their speed changed by altering the value of U% at line 510.
The title page and other double height characters are achieved by poking into the Mode 4 screen memory, which starts at &5800.
The micro looks at the character generator in ROM and pokes the value that it finds into the screen.
Each character square is defined by 8 bytes. PROCbigchars is used to do the screen poking.
The letters are held in data statements at line 2390 and 2400.
Three different short tunes are played in the game. The notes to be used and their lengths are also stored in data statements.
To give the ten highest scores a short bubble routine is used - PROCsort, lines 2440 to 2510.
Number of shots left on laser
Number of shots left on laser
Number of shots left on laser
Number of shots left on laser
Number of missiles let through in a level
Used for recursive lopos
Horizontal position of gun sights
Vertical position of gun sights
Total number of missiles let through
Number of missiles
One third of N%
One third of N%
Decides missiles' path
Speed of missiles
Flag to indicate whether laser can fire
Horizontal position of base which is firing missiles
Starting address in screen memory for double height characters
Position in screen memory in which the computer is currently poking
Increment for M%
Start of character generator in ROM
x coordinate of missiles
y coordinate of missiles
Keeps hi scores
Keeps names of hi scores
Inputs name, calculates and displays hi score, restarts program
Checks key pressed, takes appropriate action
Fires laser from selected missile base and checks for hits
one, two, three
Keeps tabs on number of missiles left
Called when you destroy all the missiles.
prints running score and level number
Pokes double height characters on to the screen
Mike Plummer offers teachers and pupils an interesting aid to mastering musical notation
When my son started to learn to play the recorder, I wondered if there was any way in which he could use our Electron to help him.
At about the same time his music teacher at school asked if I could transform an idea of hers into a computer program for the school's BBC Micros.
I had already written a program to show the fingering on a recorder and how it relates to the musical notes. NOTEST is the result of combining these ideas.
The program has three distinct phases. The first is when the graphics characters, title strings and plotting data are initialised and the various options available during the test are selected.
The options are selected from a menu page which can be recalled at any time by pressing ESCAPE.
Firstly, a starting and finishing level of difficulty are selected. The notes which are available at any level of the test are shown.
Other options include whether the sound effects are to be on or off, and whether the program will automatically go on to the next level of difficulty when a test has been completed successfully.
Also you can choose how many tries you will have to get a test at any level correct before being put out of your misery.
The next phase is the test itself. A treble stave is drawn on the screen and ten notes, selected from all of those available at the current difficulty, are drawn at random on the stave.
All the notes available are shown by name above the stave and the program will only accept one of these as an answer.
You get three attempts to get the name of the note being pointed at correct.
If the answer is right the note is played; if wrong a rude noise is made and the answer is written under the note. This process is repeated for all the notes.
Finally the program checks if all of the answers are crrect and, if so, it moves to the next level - unless it is at the final level, when it prompts for another person to try.
If the test was not correct and the total number of attempts at that level has been exceeded, the program also asks for another user.
If the manual mode has been selected the program will ask if you want to go to the next level.
I know it sounds complicated, but children seem to be able to cope with it very well, and they enjoy using it.
The notes are stored as user defined characters, and plotted on the stave with VDU 5 using positions stored in a byte array called ypos% and accessed using byte indirection. This leads both to a faster executing program and more economical use of memory.
The notes can be one of six orientations, depending on whether they are between the lines of the stave, across them, above or below them.
This data is stored in the byte array bnt% and accessed in the same way.
Each note is assigned a number from 1 to 25 and a test is set up by setting the string array quest$(10) to a random selection of notes from the string array diff$. The actual string being used is indexed by diff%, the level of difficulty.
String arrays are used because it is easier to use the Basic function INSTR to see if the answer given is a valid one.
One improvement I suggest would be to enable the test to be carried out in a different key signature, but you would have to generate a different version of bnt% for each one. Over to you, maestro...
TRUE if test was correct
Attempts so far
Maximum number of tries allowed
TRUE if level raised automatically
Starting and final difficulty
Describes n'th lest
Stores available notes for any level
Describes the degree of difficulty
Stores the questions for any test
Byte array for note position on stave
Offset to byte arrays
Byte read from byte array
Characters for a crotchet
Characters for any note on the stave
Names of notes
Byte array storing type of note to draw
Pointer to note under test
Blanks out pointer
Note being pointed at
Counts number of tries at any note
True if answer is correct
True if note is valid for current level
Local variables for FNgetnote
Display instructions and current level of test
Set up graphics and plotting data. Also the user options are set up here
Get user's name
Play note number n% for time l%
Draw a treble stave
Draw note number tnt% at position along the stave of xpos%
Set up the array quest$ with a random selection of notes
Get answers until the test is complete successfully or set number of attempts is exceeded
Returns a string describing a valid note
Make a rude noise
Assess score and move on to next level if OK
Invite next user to try
By Steve Lucas
SPACE COUNT is a simple educational game aimed at five to seven year olds.
When the program is run a number of coloured objects will be displayed on the screen and the aim is to count them.
To make life a little more exciting the counting must be done before Cedric flies his plane across the bottom of the screen.
Each correct answer makes Cedric fly his plane faster, making the next question more difficult.
If very young children are playing you may want to remove this by deleting the end of line 1290.
Each wrong answer makes Cedric slow down for the next question.
Two attempts are given for each question and the child has three lives in each game.
The game was written for the Electron. If it is run on the BBC Micro, Cedric will fly across the screen far too fast and you should make the changes suggested in line 130.
Number of lives
Position of plane
String value of answer
Words for the numbers
Array to hold positions for screen locations
Speed of game
Chooses random numbers and stored this in the array
Main control loop
Deals with end of game
Defines top window
Defines middle window
Defines bottom window
Allows you to answer the question
Tests the keyboard input
Electron User 3.03 is Item ID 3506 in our database. Last modified on Monday 16th September 2019 at 10:06:41 AM.
Spotted a typo or inaccuracy in the instructions for this item? and we'll fix it up at once!