1K CHESS? (1K ZX81)
CHOPPER SQUAD (1K ZX81)
HYPNO
MICRO-MOUSE
OTHELLO (16K ZX81)
POWER BOAT (16K ZX81)
SWAPPO (16K ZX81)
UFO (1K ZX81)
WINDFALL (16K ZX81)
ZAP



1K CHESS? (1K ZX81)
by Graham Charlton
from ZX Computing 1 (Summer 1982), page 17

Graham Charlton shows you how to do the impossible - squeeze a kind of chess
into 1K.

This program, which just fits into 1K, allows two players to play chess using
the ZX81 as their board. The program can easily be modified to trigger the
printer so you have a permanent record of the game.

It is very easy to use. When the prompt appears, just enter your move as a
string, that is, to move from E2 to E4, enter "E2E4", then press NEWLINE, and
the board will be reprinted, with your move shown. You need to enter two
separate strings (such as E1G1 and H1F1) to castle.

Pawns are automatically promoted to Queen when reaching the final rank. The
pieces are: + Rook; X Bishop; $ Queen;  King and * Pawn.

If you have extra memory, you can enter an entire game in one string - M$ - at
the beginning of the program, deleting line 60 and adding 135 LET M$=M$(5 TO).
Then the computer will whiz through a game move by move. It is fascinating to
watch. You may wish to add a loop to slow things down a bit so you can work out
what is going on.




ADVENTURE (aka Horrorville (16K ZX81))
by N Alexander
from ZX Computing 1, Summer 1982, pages 96-98

Only for the brave! Dare you take on the might of the 8K ROM in this ADVENTURE
program for the 16K ZX81, written in gruesome detail by N. Alexander of
Margate. Once you've survived the Alexandrian horrors, you can change lines 6000
to 6500, and 8000 to 8500 to enter your own adventures.




CHOPPER SQUAD (1K ZX81)
by R Morland and M Frobisher
from ZX Computing 1, Summer 1982, page 77

R Morland and M Frobisher of Chalfont St Giles sent us this great little
program for a 1K ZX81. You are in charge of a cleverly-drawn helicopter. The
"6" and "1" keys move your chopper up and down, while the "F" key fires.

Your helicopter flies in from the left of the screen, buffeted by random
crosswinds, and air pockets. You use the "6" and "7" to keep your craft in
flight, and from time to time, press "F" to obliterate an asterisk or two
underneath you. Due to lack of space, the program is not perfect, as the
helicopter from time to time leaves an 'image' of itself behind if it lands on
the base, then takes off again. You may well want to work on this problem. The
variable S is your score.



HYPNO
by Tim Johns
from ZX Computing June 1982, pages 70 & 71

This program, instead of using the obvious technique of PRINT, makes
use of POKE, putting the code values of the characters directly into the
display file, the start of which is identified in line 10. By doing this. you
get a 24 x 24 display, whereas using PRINT restricts you to 22 lines.

The "style" of each frame of the pattern is established in lines 40 and 50,
plus 70 and 80, which set the probability of the characters chosen being
changed within each frame, and hence the "uniformity" or "variety" of
pattern of the frame. and also the probability of the characters being
aligned in or out of phase.




MICRO-MOUSE
by ?
from ZX Computing, June 1982 page 49

Micro-Mouse

This program is fascinating to watch, and makes a good demonstration
of the ZX81. A 'mouse' (an inverse asterisk) starts off in a random
position somewhere near the top left hand corner of the screen, It is
aiming for the bottom right hand corner. There is a solid black 'frame'
on the screen, and a number of obstacles are placed randomly within the
frame. When the mouse finally makes it to the end, the number of moves
it took is shown.

The obstacles change position, the mouse flashes off and on a few times,
and then begins again.

The mouse cannot get itself into a trap it cannot get out of, unless it
happens to land in one at the very beginning, so have patience, no
matter how long it seems to be taking.




OTHELLO (16K ZX81)
by W P Davies
from ZX Computing 1, Summer 1982, pages 58-60

Challenge your ZX81 to this hundred-year old board game, in a program written
by W P Davies of Bristol.

Othello was invented in the 1880s. The game is based on the older game Reversi,
but has a restriction on the opening moves. Othello is played on a draughts
board, with double-sided pieces. As you'll see at the beginning, there are four
pieces on the board. You place your own piece so that at least one of the
opponent's pieces is 'trapped' between a piece of yours and your new piece. The
opponent's piece or pieces then flip over to become your pieces. The winner is
the person with the most pieces on the board when the board is filled, or when
neither of you can move.

The player's pieces are Os, and the computer's pieces are asterisks. The board
is updated after each move, together with a confirmation of the move and the
current score. There is also a cue for the next move, as well as an end-game
routine.

If you want a faster game, add 675 SLOW, 1035 PAUSE 75, 1038 FAST. This
modification blanks the screen while the clever ZX81 works out its next
devastating move, reducing thinking time to around 15 seconds.




POWER BOAT (16K ZX81)
by Tim Hartnell
from ZX Computing 1, Summer 1982, pages 35-36

If you're desperate to try out your sea legs, this little speedy simulation of
a power boat race on Ruislip Lido should start the adrenalin pumping. It was
written by Andrew Thomas and Careth Canister for the PET, and converted for the
ZX81 by Tim Hartnell.

You're in control of an extremely powerful, 16K power boat, with a
state-of-the-art on-board computer (looking somewhat like a small black thing
from Cambridge), racing around the Lido against other top champs. The course
and weather conditions vary in each game, although the weather doesn't alter
during the course of a game (the reliability of the climate in West Ruislip is
well-known). The course is marked out with buoys to give you the direction and
maximum speed for that section. There are 20 sections in all. Even finishing
the race is an achievement, as you'll see when you run the program.

You must enter the amount of RUDDER you need to make a turn. Too much and
you'll cut the corner, too little and you'll overshoot the corner. Slightly
cutting the corner, if you can manage it, helps you get ahead of the other
drivers. However, bad driving on the corners will get you disqualified. The
lower the number entered for the rudder, the smaller the turning circle and
hence the smaller the radius. Entering zero will make your craft continue in a
straight line. The ratio between the rudder and the radius varies from one to
10 when stationary, to one to five at top speed, just to make a difficult game
nearly impossible. To complete the course, you must also regulate your speed to
a value near to, or slightly above, the maximum speed for the section.

The more power you supply to the drive, the faster the boat will go. If you
enter too much power, you run the risk of a most dramatic flip-over.

Variables used in this program are:
C  is the difference between actual and rated turning circles.
D  is the distance to the leader.
E  is the previous 'power to the main drive'.
E1 is the present 'power to the main drive'.
F  is the amount of fuel remaining.
M  is the maximum speed for the section.
P  is your position.
R  is the rated turning circle.
S  is your present speed.
T  is the rudder position.
W  is the prevailing weather condition.
X  is the section number.



SWAPPO (16K ZX81)
by Tim Hartnell
from ZX Computing 1 (Summer 1982), page 61

Get your digits into order in the smallest number of moves.

This program was originally written by Don Scales, modified by H J Garwood to
run on a TRS 80 and further modified by Tim Hartnell to make it run in Sinclair
BASIC. Once you've got it working as listed, you might like to modify it so
that instead of just stopping when you get the digits into order, the computer
prints them out in inverse graphics, and gives you a congratulatory message.

A further modification would be a "lowest score" feature. Pressing any key at
the end will give you a new game.




UFO (1K ZX81)
by S Hassen
from ZX Computing 1, Summer 1982, page 89

This game UFO, written by S Hassen of Worthing, was written to show just how
much can be squeezed into 1K without resorting to machine code. Mr Hassen tells
us he has used every trick he knows to get the program into 1K. The object of
the game is to shoot down the saucer hovering near the top of the screen. As
you probably expect, the "5" will move you left while the "8" moves you right.
Press "0" to fire. As you'll see when you run the program, the saucer does not
sit still, but moves back and forth, calling for all your aiming skill. When
struck (by a little full stop which zaps up to the saucer) it blows apart, and
your score is shown. The lower the score, the better. Any score over 72 is
lousy. Any score less than 10, I don't believe you. The game ends once you've
hit the saucer, and waits until you press any key to start again. The PAUSE 4E4
(developed by Trevor Toms, author of THE ZX81 POCKET BOOK) is remembered by
thinking of it as 'pause forever'. It obligingly waits, more or less, forever
for you to press a key to get things underway again. If you have trouble seeing
the full stop as it slowly zaps towards the target, replace it with a graphic A.




WINDFALL (16K ZX81)
by C Llewellyn
from ZX Computing 1, Summer 1982, page 14

From Ottery St Mary in Devon comes this program by C Llewellyn, designed to
appeal to your materialistic instincts. Run over the money flowing up from the
bottom of your TV, avoiding the counterfeit cash.

The aim of the game is to acquire as many currency notes as possible during the
one minute 23 seconds the game runs, without picking up any inverse Cs, which
determine that all previous notes collected are counterfeit. In order to keep
the game moving at a fairly rapid pace, the SCROLL function is used, and the
information needed for scoring is fed into strings, which are processed at the
end of the game. All currency, you'll be delighted to know, is converted into
Sterling, at an ex-change rate of 55p to the dollar. The standard pound sign is
worth a pound (surprise, surprise), with the inverse pound sign worth a fiver.
An ordinary dollar sign is 55p, and an inverse dollar sign is $5, or 2.75.

You are an inverse blob at the top, with "1" to move left, "0" to move right
and "9" to move down. You score by running over the relevant sign, making sure
you avoid the inverse C.




WINDFALL (16K ZX81)
by C Llewellyn
from ZX Computing 1, Summer 1982, page 14

From Ottery St Mary in Devon comes this program by C Llewellyn, designed to
appeal to your materialistic instincts. Run over the money flowing up from the
bottom of your TV, avoiding the counterfeit cash.

The aim of the game is to acquire as many currency notes as possible during the
one minute 23 seconds the game runs, without picking up any inverse Cs, which
determine that all previous notes collected are counterfeit. In order to keep
the game moving at a fairly rapid pace, the SCROLL function is used, and the
information needed for scoring is fed into strings, which are processed at the
end of the game. All currency, you'll be delighted to know, is converted into
Sterling, at an ex-change rate of 55p to the dollar. The standard pound sign is
worth a pound (surprise, surprise), with the inverse pound sign worth a fiver.
An ordinary dollar sign is 55p, and an inverse dollar sign is $5, or 2.75.

You are an inverse blob at the top, with "1" to move left, "0" to move right
and "9" to move down. You score by running over the relevant sign, making sure
you avoid the inverse C.




ZAP
by Paul Gausden
from ZX Computing June, 1982 Page 37

ZAP

Paul Gausden from Kingswood brings a little machine code into play to put
you in the cockpit of a biplane engaged in a deadly battle over the Straits
of Mallacash.

Paul writes to ZX Computing: "A short while ago I was writing a 'space war'
type of program with a starry sky, and moving space ships by printing black
squares over them which meant that as the game progressed all the stars
disappeared.

 I was trying to find a way around this when a friend lent me his "Programming
the Z80" by Rodney Zaks. This helped me write the following machine
code program.

	ld hl,7530h
	ld de,(d-file)
	ld bc,02D6
	ldir
	ret

This program loads what is above memory locate 30000 into the display, and
by changing over the de and hl registers it saves the display above 30000.
This meant that when I printed out my sky I used one routines to save it,
then used the other as a type of CLS, but recalling the same background
each time, so now the stars stayed where they were!

One of the programs I've written using this routine is ZAP. It uses the
routines to save the foreground (the interior of the cockpit) and recalls it
each time. You are chasing after an enemy aircraft and you have to remember
the controls work in reverse."

As you can see from the screen printout, the enemy plane is the little thing
you can see through the cockpit, it moves randomly around. and you must use
5, 6, 7 and 8 to move yourself into a position where the enemy plane will be
on the cross of your sight. As Paul pointed out, you have to remember that
you are, in effect, moving backwards, swinging the view of the enemy against
the sky. This may sound complicated, but it becomes very clear once you RUN
the program, and gives a good impression of a dogfight.
