SAUCERS
-------
by N.J.Kemp
from Sinclair User Annual, 1983

THE GRAPHICS on Saucers are the best we have seen for the old Earth Defence
routine. Your task, as usual, is to halt the descending hordes of tentacled
terror.

In this listing you are equipped with a movable gun-sight, under the usual
cursor control, and if too many of these appalling aliens are allowed to land
they erect their own mucous-covered metropolis and use earthlings for
toothpicks.

The most effective part of the display is the use of a perspective grid to
represent the Earth's surface. An excellent program, to be run, recorded,
revised. Submitted by N.J.Kemp of Liskeard, Cornwall, for the 16K Spectrum.



CHARACTER TABLE PRINTER (ZX-81)
by Phil Garrett
from Sinclair User (Annual 1983), page 67

The ZX-81 is a digital computer, so not surprisingly it is all done by
numbers. Every character is made up from a grid of eight-by-eight dots. A
space character has all the dots off (white), and an inverse space has them
all on (black).

Starting at address 7680 in the ROM, each character in turn has eight
consecutive bytes which determine its pattern. Each byte represents a single
row of the character and if we convert that byte from decimal, 0 to 255, to
binary, 0000 0000 to 1111 1111, the pattern of dots on or off is revealed.

The Character Table Printer program has been developed in an attempt to make
all this clearer. It shows the address in the ROM, its decimal contents, the
contents converted to binary, and then the binary converted into spaces and
inverse spaces.



TRIGONOMETRY (ZX-81)
by P L Radford
from Sinclair User (Annual 1983), page 81

Which type of child were you? The type who instinctively hides at the back of
the class, whispering and flicking paper? Or the kind who rushes
automatically to the front and sits, tense and eager, taking copious notes
with the sharpest pencil in school?

P L Radford of Birmingham sent a program which will be useful for both types.
The first type will appreciate a program which reminds you how to do all
those tricky trigonometry equations and the second will be glad of a way of
doing them more quickly.

A thorough and useful listing for the 16K ZX-81, to be taped and kept.



MAGIC SQUARES (ZX-81)
by Aviad Raz
from Sinclair User (Annual 1983), page 83

Aviad Raz, of Haifa, Israel, sent Magic Squares, a neat, quick 1K program for
the ZX-81. It calculates and displays magic squares, a box of nine numbers
which add to the same figure whether added horizontally or vertically.

He explains that 1K of memory is not sufficient to allow the square to work
diagonally.



SURROUND (ZX-81)
from Sinclair User (Annual 1983), page 84

You will probably recognise Surround as soon as you RUN it. It is a version
of a fairly standard routine in which you are required to surround your
adversary before he can surround you. Both players are in continuous motion
and are not allowed to cross their tracks or those of their opponent, or to
hit the boundary or the score display.

What will surprise you is the way the ZX-81 can recognise two keys when
pressed simultaneously. That is not possible using INKEY$ and is achieved by
utilising address 16421; which contains a number which changes as groups of
keys are pressed. Lines 185 to 260 translate the number into a series of
possible moves.

Black uses keys 1-5 to move up, Z-V to move down, Q-T for right and A-G for
left. Grey uses the keys 6-0 for up, Y-P for right, B-M for down and
H-NEWLINE for left. After a crash the other player scores 1 and the winner is
the first to reach 15.

The routine enabling two players to participate obviously can be used in many
graphics games.



RUNWAY (ZX-81)
by Mike Bidden
from Sinclair User (Annual 1983), page 107

It is war-time and you are flying a transporter aircraft to land supplies
behind enemy lines. As the runway approaches, you can see that it is mined
but it is too late at that stage to pull up, since your airspeed is too low.
You have, therefore, to land and taxi around the mines to take off again and
see the runway recede.

The steering logic is in line 30. It uses INKEY$ to decode keys 5 and 8 on
the keyboard.



SINCLAIR PROGRAMS, September/October 1982
=========================================
ZX80


BEAN CUP
--------

SOMETIMES, when the cursor finger is worn to the knuckle and we are blinking
at 50 cycles per second, nothing pleases us like a game where thinking is not
just something between you and a high score. When the game works on a ZX-80,
we are really happy.
Bean Cup is a fine brain-game from Nigeria. You sit cross-legged with a row
of seven cups in front of you. Each cup contains four beans  except the
store-cup on the right-hand end of the row, which is empty. Your opponent
faces you with exactly the same equipment in front of him.
The display will show you two rows of numbers, representing the beans. The
bottom row is yours and the top one is operated by the suddenly-cunning ZX-80.
You move by taking all the beans from one of your cups and dropping one into
the cup on its right, one into the cup on the right of that, and so on,
anti-clockwise round all 14 cups until you finish. You cannot empty the
store-cups. The game ends when all the beans are out of circulation and the
winner is the player with the most beans in his store cup.
Input the number of the cup you wish to empty and the computer will display
the position of the beans after your move and its own response. If you have
no beans on your side to move, then enter any number from 1 to 6.
If you can beat the machine you are better than we are. Submitted by Paul
Morriss of Alford, Lincs.


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