YOUR COMPUTER, July 1985
========================


ANAGRAMS
--------
Marc Kavanagh, 13 Barber Street, Padfield, via Hyde, Cheshire SK14 7EG, wins
May's competition. He neatly illustrates the use of nested loops with a
program to print out three, four and five letter word anagrams.
The program can be easily expanded to cope with larger anagrams by altering
line 80 and adding more loops. It is written for the Spectrum but will run on
most other micros with minor alterations.


**********************************************************************


BACKBOOGIE
----------
Timothy Closs provides continuous interrupt-driven background music for your
DIY games.

HOW MANY times have you wished you could boost your games programs with some
background music as in Manic Miner, Automania and Gilligans Gold? Well, now
your wish has been granted with Backboogie!

Backboogie will repeatedly play a piece of music, short or long, without
interfering with the running of your own programs!

The program itself is 100 per cent machine-code and uses thc Spectrums
interrupt system to run it. As a lengthy discussion about the system is not
needed here, I will just say that the Spectrum can be made to run a
machine-code program stored at a certain memory address every 1/50th second 
this process is known as an "interrupt".

The BASIC program in listing 1 helps you compose your pieces of music and
also stores some necessary data in the memory.

Let me explain how the program works. The music you compose is stored as a
series of numbers, each representing one note; ie.:
	0 for C
	1 for C#
	2 for D, etc.
The Spectrums own program for converting these numbers into values the Sound
Generation ROM Routine can accept is too slow, so I have developed a faster
routine using the data stored by the BASIC program. Having calculated these
values, Backboogie calls the Sound Generation ROM Routine to produce a short
musical sound before returning to your game.

The game then continues running until, 1/50th second later, it is necessary
to produce another musical sound of the same frequency as before. When a
series of short sounds is heard in quick succession like this they give the
impression of a continuous musical note.

The composer allows any note within a range from middle C up to 20 semitones
above to be entered. Use keys 6 and 7 to move the bar up and down until it is
level with the desired pitch. Pressing 0 will now enter the note and the bar
will move across one column. You can delete a note by pressing 1  the bar
will move back one column. Continue entering your notes until you have
finished your composition.

Pressing E will add final specifications to the machine-code routine and then
cause you to escape from the BASIC composer program.

Your music can now be saved, together with all the other necessary data and
routines by typing:
	SAVE "BACKBOOGIE" CODE 60180,0+500
and loaded by typing:
	LOAD"" CODE
To "switch on" your music during a
program, include:
	POKE 65534,0: POKE 65535,237: POKE 65532,0: POKE 65533,0
	RANDOMIZE USR 60180
To "switch off" your music, include:
	RANDOMIZE USR 60190

First, enter the composer program in Listing 1 and save it by typing:
	SAVE "COMPOSER" LINE 1
Now NEW the program and type in Listing 2. RUN the program and enter the code
in Listing 3, working from left to right and from top to bottom. When you
have finished, the code will automatically be saved as "Boogie".

If you do not wish to type in all the progran and code yourself, send a blank
cassette, SAE and 1 to me at: [Address Deleted].


**********************************************************************


PONGY
by Miquel Van Smoorenburg
from Your Computer, July 1985

Miquel Van Smoorenburg with a ZX-81 game featuring that character we
all know and love - the amiable little inverse A who tries to survive
against the psychotic tendencies of four nasty inverse Os.

PONGY IS an amiable little penguin - thanks to the chunky ZX-81
graphics an amiable little inverse letter A - that has to collect
diamond ice-blocks. Not particularly served by four sno-bees.

To enter the game, first, you have to create a Rem line with enough
characters to hold the machine-code. You can do this very easily:
Enter a line 1 like this
	1 PRINT 0+0+0+0+0+0+ ... etc.
until you have typed 43 zeros. Check the line by typing
	PRINT PEEK 16511+256*PEEK 16512.
This should give 345. If not, accord your print statement. Then edit
this line eight times, until you have lines 1 to 9. Now enter the
following commands:
POKE 16510,0
POKE 16511,65
POKE 16512,12
POKE 16513,118
POKE 16514,118
POKE 16419,5
5 SAVE "PONGY"

Don't type Newline during the poking to obtain a listing or the
computer will crash! If it does crash, switch your 81 off and try
again. If everything is OK, enter the hexloader and the hexcodes as
usual. Now save it, for security, and delete the hex-loader. Enter
lines 10-50 from the Basic listing, and enter Run 10. The game should
start. You can break out of the game by pressing Break during the
title- screen. Typing Run will autosave the game.

The speed of the game is changeable: the Poke in line 10 controls
sno-bee speed the Poke in line 20 controls timer-speed and the List in
line 30 controls pongy-speed. Decreasing the values will increase the
speed. Changing pongy-speed also affects the timer. It is also
possible to change the number of lives you have, to a maximum of 9, by
typing POKE 18006, 28+(number of lives).

If you are interested in creating your own Pongy screen layouts, you
have to enter lines 100-430. Enter Run 100, and you are to create your
own layout.

Use cursor keys to move. If you are satisfied, press 0 and enter the
screen-number: 1 to 4. Then you can place the diamonds wherever you
wish, use 0 to enter. After you have entered four diamonds, the
program stops. You can then watch the result of your action by typing
Run 10.

You start the game in the middle of the screen. Your task is to
connect three or more diamonds - inverse 0's - in one straight line.
Movement is made with the arrow keys, and the direction of Pongy is
shown by one big arrow on the left hand side of the screen.

To move blocks, position Pongy against the block you want to move and
press 0. If another block, or the wall, is behind the block it will be
grinded to powder - keep 0 pressed - unless it is a diamond. You can
kill the sno-bees by squashing them with a block and 10 points are
gained for that. However the sno-bees will re-appear in the left-hand
corner.

If you have succeeded in positioning three or more blocks in one
straight line, you get a bonus of 10xtime left, and when time reaches
zero, you move on to the next sheet. In total there are four different
sheets. When you are out of lives, the game ends. You can also abort
the game by pressing Break. If the high-score is beaten, the computer
will ask you to enter your name - don't forget to press Newline.
Answering the question "another game?" with N will bring you back to
the title screen.

It is possible to hold the game by pressing H. Press another key to
continue.


**********************************************************************


SULTAN'S TOWER
by Remko Blakenburgh, Leiden, Holland
from Your Computer, July 1985

SULTAN'S TOWER is an original, fast-moving action game which consists
for the most part of machine-code. The scene is laid in Arabia in the
middle ages. Fatima, the girl-friend of the Arabian prince Achmed, has
been kidnapped by the wicked Sultan of Bahrain and put in his harem.
She is detained on the upper floor of a tower, which consists of 10
floors. You play the part of Achmed, who would rather keep his girl
for himself. You must save Fatima but, to do so, you must reach the
ninth floor starting off from the ground level. Each floor is divided
into six parts which lie above each other. You must start off from the
bottom part and ascend using ladders and ropes. At the left of the
upper part there is a door- way leading to the floor above you. When
you have reached the upper part of the ninth floor you must grasp
Fatima and run back downward. You can use slides to move down quickly.
To descend to a floor below you, you should use the doorway at the
left of the lower part of the floors.

When you have reached the ground level, you can leave the tower by
walking through the exit at the left of the lower part and have a
happy life together with Fatima. Unfortunately, it's rather difficult
to save girls from harems. On every floor, harem-guards are busy
chasing you. You had better beware of them because you will be
sentenced to imprisonment for life if they get you.

As you progress, more harem-guards will be employed by the ugly sultan
to make life harder for you. Each time you reach another floor two
more guards will try to make an end of your freedom.

Sometimes the harem-guards fall into holes. In that case, a guard
can't harm you very much but after some time he will climb down to the
part below him using a rope. You can use this rope later to climb up
or down.

Your time to complete your mission is limited. If you run out of time,
a pretty big bomb at the bottom of the tower will explode, destroying
the tower with you and your girl.

The keys used to control the game are:
I - up/jump
J - down
Y - right
T - left
0 - hold

If you are not pleased with these key controls you can change them by poking:
16830, code of key for hold
16838, code of key up
16845, code of key down
16852, code of key left
16859, code of key right

You can abandon a game by pressing Shift on its own.

The machine-code is held in one large Rem- statement with line number
zero. Before entering the machine-code, you must obtain this line. To
do so, enter a line
	1 REM
followed by 128 characters - that's four full lines. Then, edit this
line and change the line number to 2. Continue this procedure until
you have lines 1-11. Finally, enter a line
	12 REM
followed by 77 characters.

You can check whether your lines have the correct length by entering:
PRINT PEEK 16396 + 256 * PEEK 16397 - 16509
You should get the number 1557. If not, check your lines and correct
them where necessary. Now enter as direct commands, in
succession:
POKE 16510,0
POKE 16511,17
POKE 16512,6
POKE 16514,118
POKE 16515,118
You now have a massive Rem-statement of 1551 characters long with line
number 0. Type in the hex-loader and enter the hex codes. I advise you
to save the program at regular intervals in order to prevent you from
losing all your work when a crash occurs.

After having entered the hex-codes, delete the hex-loader and type in
the Basic program. Now save the program by entering:
	RUN 9900

The way in which the program is saved may seem a bit cumbersome, but
it is actually a means of reducing saving and loading time. It works
like this: before saving, the system variable Ramtop is set to 0,
whereby the display-file is reduced to its minimal size. Now the
program is shortened for about 750 bytes, so loading time is
considerably reduced. After saving, Ramtop will get back its previous
value, 128, which causes the display- file to take its normal size.


**********************************************************************


TAPE BACKUP
-----------
I HAVE CREATED the ultimate tape back-up program for the ZX Spectrum. It is
very reliable and can copy any program. It can even copy music. It can
back-up any length program  1000000K+  and only takes up nine bytes.
It works by taking in a signal from the MIC and putting it out the EAR to
another tape recorder. The only disadvantage of this system is that you have
to pull the plug upon finishing. Note that the border doesnt change colour.


**********************************************************************


TO THE TOP - Julian Wood (Your Computer-July 85-Page 72)

JULIAN WOOD CLIMBS TO SUCCESS BY AVOIDING INVADERS AND A BEEFBURGER IN BAPS.

To The Top is a game for the 48K Spectrum, featuring smooth animated sprite
graphics, music, continuous sound, and a high score table. The object of the
game is to move your man to the top-right hand side of the screen as quickly
as possible, guiding him through the holes in the moving platforms which be-
come faster the higher you gets.
 However, he is not alone. To accompany him are various moving objects whose
touch is lethal. On the first screen, there is only a rotating ball - which
moves down the screen by falling through the platforms - to contend with but,
on further levels, he is joined by several other characters, including a Pac-
man, a space invader and a beefburger in baps. These all move across the
screen from left to right, gradually working their way down.
 In order to speed you up a bit, there is a bonus which decreases as time pas-
ses. What is left of your bomus to completion of a screen is added to your
score. If you can ever complete the first seven levels with your three lives -
surely this isn't possible? - a congratulatory tune is played, you get an ex-
tra life, and the game goes back to the first screen, with faster moving plat-
forms.
 The control keys for the game are given in the instructions in the game, but
note that, to make things a little less impossible, your man has the advantage
of a wrap-around screen.
 To enter the game, first type in the machine-code loader in listing 2, with
which you can enter all the machine code in listing 1. With listing 1, in the
left-hand coloum are the memory address, and in the right hand column are the
checksum values. Enter the fives codes in between, and then the checksum value
for that line.
 If you have made a mistake in entering the line, a tone will sound, and you
will have to enter that line again. If you enter a hopelessly wrong value for
one of the machine-code bytes, a different tone will sound, and you have to
enter that byte again. Basically, all that is shown in listing 1 should tally
with what you are entering the machine code.
 When you have entered all the 5400 bytes of machine code, and are satisfied
that all is correct, type New after entering
        CLEAR 26999
to get rid of the Basic, whilst retaining the machine code. The enter the pro-
gram in listing 3, and save the two parts of the game using:
        SAVE "TO THE TOP" LINE 0: SAVE "C"CODE 27000,5400
 Verify, and you are then ready to play.

TYPE: Arcade (Jumping Jack)


This info file was typed by Michael Bruhn


**********************************************************************


