SINCLAIR PROGRAMS, August 1985
==============================


AIRWOLF (Wolfair) - Spectrum

Fly your plane, the Wolfair jet, up the screen to the escape warp. Use
the cursor keys to move in the normal directions, Q to increase rotor
power, A to decrease rotor power, V for turbo and B for speed brake.
Travelling at turbo over the whole distance will mean that you run out
of fuel before you reach the escape warp. However, if you never enter
turbo you will be hit by the enemy missiles which show up on your
radar every so often.
	Wolfair was written for the Spectrum or Spectrum Plus by Neal
Hughes of Telford, Shropshire.


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


DIGITAL CLOCK
-------------

Digital Clock written by D.Galbraith gives a continuous screen display of the time from when
it is set to start by the user's input.  It gives hours, minutes and seconds just as a digital watch
does, except, unlike most digital watches, this is a 24-hour clock.  For example, 3pm will
appear as 15:00:00.  It is a useful program to help the beginner to understand how to use the
Spectrum's timing ability.  Many arcade games test a player's skill against the clock, so this
will show you how to build a clock into your own program.


Variables
---------
A variable is a name given to a location in memory used to store a number.  The value of a
variable usually changes while the program is running.  Here are the main variables used in
Digital Clock.

hr is the hour of day
min is the minute of the hour
sec is the second of the minute

These 3 variables are initially set by the user, but thereafter by the computer's clock.

n is the number of frames which would have been shown on the TV screen had the computer
been switch on for the time shown.  Because mains frequency in this country is 50Hz, the
Spectrum is able to display 50 frames per second, and certain locations in memory store the
frame count from switch on.  It is by modifying the contents of these locations that we can
simulate a real clock, so n in this case is made a frame count to suit our clock time.

m is a framecount like n.  Two counts are needed as you will see.

a, b and c are really n broken down into three bytes.


How It Works
------------
Lines

20        Prints title.  A variable is set up for a GOTO in line 200.

40-90     Read hours, minutes and seconds for start time and convert to number of
          frames by accumulating in n.

110-130   Convert n into three byte format.  You will probably be familiar with two byte
          format where the high order byte is how many times a number can be divided
          by 256, and the low order byte is the remainder.  For three bytes, the highest
          order (a) is how many time n will be divided by 65536 (256x256).  The next
          order (b) is how many times the remainder divides by 256 with the lowest
          order (c) being the remainder of this.

140       POKEs frame count into system variable FRAMES.  As you can see from
          Chapter 25 of your Spectrum manual these are the three bytes at locations
          23672, 23673, 23674.  Least significant first, so these bytes are filled with c,
          b, a in that order.

150-300   This is the "runclock" loop which will continuously update the time for as long
          as your Spectrum runs.  The frame count starts to be incremented by the
          computer automatically from the time it is set up by line 140, adding 1 to c
          every 1/50 sec, setting c to zero, whenever it reaches 255, simultaneously
          adding 1 to b, etc.

160-180   Monitor the present frame count twice and hold as n and m (in seconds when
          divided by 50).  Two counts are necessary because of the hidden danger of
          transition between the three bytes as they are being PEEKed.  Pages 130-131
          of the manual explain this more fully.  The correct count is the larger of the
          two, which is found in line 180.

190-200   Determine hour and reset frame count to zero if hour greater than or equal to
          24.

210-220   Calculate minutes and seconds.

230-290   Convert hr, min, sec into string variables (holding characters rather than
          numbers).  This allows a 0 to be prefixed to a number less than 10, so that
          hours, minutes and seconds will always be printed as 2 digits each in line 290.

300       Loops back to 150


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


FIFTY
-----

Your arrow shoots across the screen, below a series of numbers.  Your aim is
to reach a score of exactly 50 with 25 arrows.  Press S to stop the arrow in
flight.  If the arrow stops beneath an arrow or an asterisk, your score will
be increased.

Fifty was written for the Spectrum of Spectrum Plus by Alistair Sutcliffe of
Halifax, West Yorkshire.


Typed by Jonathan Kay (Jonathan@kay026.freeserve.co.uk)


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


FIREFIGHTER
-----------

Benjamin Rabbit is the new recruit at Burrowville Fire Station. As soon as he
is left in charge, the firebug tries to burn down the fire station. Benjamin
must put out the fires by stamping on them or by running over a fire bucket
which will fall onto the flames. He loses energy when he steps on a fire or
runs into the firebug. If Benjamin manages to drop all the fire buckets in
one room to the ground level, he will start a new room.

Firefighter was written for the 48K Spectrum or Spectrum Plus by T Sherwood
of West Bromwich, West Midlands. Underlined characters are those to be
entered in graphics mode.


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


GOLD RUSH (Gold Mine) - T.Sherwood (Sinclair Programs-August 85-Page 22)


Benjamin Rabbit has found an underground Gold Mine. He aims to collect all
the gold and place it in his safe. Once he has collected five bars of gold
he can escape to a new cavern. Blue lifts will take him up the lift shafts,
and wagons will take him along the mine workings. Runaway waggons are a
danger, for they may run him over. The major problem though is the killer
bats, which will home in on Benjamin.
Written for the 48k Spectrum or Spectrum Plus by T.Sherwood of West Bromwich,
West Midlands.

------------------------------------------------------------------------------
TYPE: Arcade

COMMENT:


This info file was typed by Matthew Pimm

Downloaded from:
Desert Island Disks -- http://www.image.dk/~frankie/
Maintained by:
Michael Bruhn -- frankie@image.dk


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


IRREDUCIBLE
-----------

Take any positive integer.  Now, apply the following rules to it.  If the
number is odd then multiply it by three and add one.  If the number is even,
divide it by two.  Continue in this way until you reach one.  Can you find
a number which does not read one?

Irreducible was written for the Spectrum or Spectrum Plus by J Rundle of
Aldershot, Hampshire.


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


MAGIC SQUARE
------------

A magic Square is one in which the sum of the numbers running horizontally,
vertically and diagonally is always the same.  Magic Square will create one
of these squares to the size of your choice, beginning with the number of
your choice.

Written for the Spectrum or Spectrum Plus by J Rundle of Aldershot,
Hampshire.


Typed by Jonathan Kay (Jonathan@kay026.freeserve.co.uk)


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


VISITORS - Eray & Ozturk Aker (Sinclair Programs-August 85-Page 45)


Visitors from space are determined to flood cities by destroying dams.
Equipped with the latest technology, you hang over their heads in an immense
balloon, ready to blast their shots out of the air

Visitors was written for the Spectrum or Spectrum Plus by Eray and
Ozturk Aker of London SE13.


------------------------------------------------------------------------------
TYPE: Arcade

COMMENT: Andrew Barker: I typed all the correct data according to the pro-
gram listing. However, I feel that the balloon doesn't look quite right.

This problem was solved by Lee Tonks.


This info file was typed by Andrew Barker

Downloaded from:
Desert Island Disks -- http://www.image.dk/~frankie/
Maintained by:
Michael Bruhn -- frankie@image.dk


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

