ZXComputing Feb-Mar 1983
ZXComputing Feb-Mar 1983
£1.85
o n a f i d p r o g i a m
SPECTRUM COMES TO LIFE !
ABBEX
THE GAMES PEOPLE
SPOOKYMAN EAT THE PILLS AND KEEP AWAY FROM
THE GHOSTS. EAT THE VITAMINS AND
CHASE THE GHOSTS. FULL MACHINE
CODE ARCADE ACTION AND SOUND.
DESIGNED TO MAKE YOUR ADRENALINE
RUN HIGH. PRICE £4.95
48K Z X S P E C T R U M
COMPILER
METEOROIOS COMPILER 4SK 3 0 M A Z E N T U R E
This version has been hailed the A mare program and adventure in
best: 3 sizes of meteoroids, saucer, Benchmarks one Ama;mg "monster chase'
wrap-around screen, bonus ship at BSC S P E C T R U M (BASIC) SPtCTRUM (COMPILER) animation and more than a hmt of
10000 points, amaj.ng explosions, BWl \0i 4.8 0 15 dungeons and dragons 48K only,
rotate letT/right. thrust, lire, BM2 3 t 8.7 009
hyperspace and sh>eld. Full feature BMJ 82 21.1 1 10
'arcade' sounds and full colour BM4 87 20* 099
Works with Joysticks (from us at BMS 91 240 1.11 THE
£.19 50) O n l y t l 95 me (16K or BM6 139 55 3 1 91 ZOLAN ADVENTURE
48K) 8M7 21 * 80 7 2 14 A full adventure crammed into 16K1
What !h* SUPER C compiler does isaltnost magical It turns a Quite astounding how extensive and
program written in Spectrum BASIC into a machine code engaging this program is. L4 95.
eouivalent SUPER C is child's play to use -Simply type in a
program as usual lor n»d from tape) and in a few key presses
SOFTIME SUPER C turns H instantly >ntc a super !*tt machine code Please rush me
version it Will comp.le virtually any Spectrum BASIC
Amaimg piece of machine code statement, plus a *rwfeaturesnot available to you usually. Cut
programming-produces a Mr/Mrs '
eitra thought w>l' be required tor strings and floating
continuous real time clock on There is no program you can »ntc in BASIC which cannot be Address
screen all the time-even when 1 turned into a SUPER C version However, enhancement
running/writing another program r*ck.t«m will be available m the N«w Year to aid string
Has alarm facility For 16Kor48K. handling, ttoat ng potH. and will offer a host of caher features- or lor INSTANT CREDIT CARD
only C3 95 each for a nominal cost W-lh SUPER C your Spectrum will order 7 days a week phone:
run fj'.icr than with either FORTH or PASCAL - and no new 01 930 9232.
• O » T * K •»acrnuM l o r w t m lar^uage lo learn' SUPER C comes complete wtlh ealeniive
documentation, a manual written by T>m Langdeii. enampie
S«nd cheques or POs to:
pmgrams. and all boied in a professional library case Less 3 2 9 Croited Road. London
than half the pfice of a compiler lor any comparable micro. • SE24. TW: 0 1 - 6 7 4 4 5 7 2
£14.95 mc • O T I K . inCTRUM IOFTW4M
983 Z X C O M P U T I N GF E B ,M A R C H1 9 8 3 3
ZX Computing Deputy Editor: Roger Munford Origination and design by MM Design £t Print,
Volume One Advertising Manager: Jeff Raggett 1 4 5 Charing Cross Road, London W C 2 H OEE.
Number Five Divisional Advertising Manager: Beverley McNeil!
Feb March 1 9 8 3 Managing Editor: Ron Harris Published by Argus Specialist Publications Ltd,
Managing Director: T J Connell 1 4 5 Charing Cross Road. London WC2H OEE
Letters
CONTENTS 8• On Your Spectrum 30 V s u m s And Fun For
infants 52
Your thoughts and opinions on the Sin-
clair range of computers and the industry Phil Garrett takes a critical look at some
in general. of the latest Spectrum software.
A superb educational package for the
younger Sinclair user.
Numerology 13 • House Names . . . .34
Defending Your
What's in a name? Type in your friends'
names and find out! Names, but no numbers? Here's a
Spectrum 58
program to help you to get a clear picture
of those difficult addresses.
Space Adventure .16 A great game for your ZX Spectrum —
won't those aliens ever learn?
983 ZX C O M P U T I N G FEB, M A R C H 1 9 8 3 4
J
mm? ZX Computing IS published bi monthly on the fourth Fridav of the month. Distributed by Argus Press Sales & Distribution Ltd. 1 2 - 1 8 Paul Street. London EC2A
4 J S . 0 1 2 4 7 8 2 3 3 . Printed by: Henry Garnett Ltd.. Rotherham
The contents of this publication including all articles, designs, plans, drawings and programs and all copyright and olher intellectual property rights therein belong
to Argus Specialist Publications Ltd. All rights conferred by the Law of Copyright and other intellectual property rights and by virtue of international copyright con-
ventions are specifically reserved to Argus Specialist Publications Ltd. Any reproduction requires the prior written consent of Argus Specialist Publications Ltd.
Argus Specialist Publications Ltd 1 9 8 3
Conquering LOAD/
of
n.
All you ever wanted to know about
prime integers but were afraid to ask... SAVE Problems . . 108 Machine
Specifications . .127
Some good hints on how to make sure of
RUNning those programs from cassette.
What can I do With A reference guide to the Sinclair range of
1K 91 products. It's all here.
Spectrum
ing
If you thought IK was restricting, just
Breakout . . . . . .110 ZX Computing is constantly on the look out for
well-written articles and programs. If you think
wait 'till you've read this article! that your efforts meet our standards, please feel
A version of the classic arcade game for free to submit your work to us for consideration.
your Spectrum. All submitted material should be typed if possi-
ble; handwritten work wilt be considered, but
code on Your In The Air your program alone will not be considered. AH pro-
grams must come complete with a full explanation
Spectrum 94 Tonight . . .113 of the operation and. where relevant, the struc-
ture; Spectrum programs should be accompanied
with s cassette of the program (which will be
returned) as well as the listing
Take your ZX Spectrum on its maiden All submissions will be acknowledged and any
More from the machine code master, flight. Our reviewer has a look at a published work will be paid for at competitive
rates. All work for consideration should be s e n l t o
ve including two great programs to show couple of cassettes and gives us his the Deputy Editor at our Charing Cross Road
off on your Spectrum. verdict. address
1
Z X C O M P U T I N G F E B / M A R 1983
NEW! ZX SPECTRUM TAPE NOW READY!
NEW! EXPANDED DISC VERSIONS FOR
APPLE, PET AND SHARP!
THE
\m- 111) m i
ASP SOFTWARE
WELCOME
8 Z X C O M P U T I N G FEB/MARCH 1 9 8 3
WELCOME
name of a company offering On page 121 is a subroutine for The result is a subroutine which
good service and a willingness drawing an almost straight line involves only 11 lines, and
to help the 'amateur'. I am in no from a pixel (A,B) to a pixel which is conceptually simpler
way related or in fact have never (C,D), for use with a program than that in the ZX81 manual. It
met Mr Salem or anyone from which would generate numerical also uses less memory, so that
Hilderbay. values of the co-ordinates A,B,C when used with the preface
Yours faithfully, and D. For the purpose of what given above, a complete
will follow, imagine the sub- diagonal line from (0,0) to
JG Marshall, routine to be prefaced by a sim- (63,43) or from (63,0) to
Sutton Coldfield. ple set of INPUT statements, as (0,43) can still be drawn with
West Midlands. below: the 1K version. This is not the
No address 10 INPUT A
case with the 'official' program.
28 I am sure this idea will not
Dear ZX Computing, 20 INPUT B
shatter the world of relatively
You kindly reviewed our '0' 30 INPUT C
experienced programmers, but
Level Maths software in the 40 INPUT D
beginners who are puzzled by
August/September issue of ZX 50 GOSUB 1000
the subroutine in the manual
Computing, However, since 60 STOP
may find it useful.
then several people have told us Excluding REM statements, the Yours faithfully,
of the difficulty in finding our ad- subroutine given in the manual is
dress as it was not given in the 26 statements long, and the K Smith,
article. Any beginners out logic is fairly difficult to follow. I
could not avoid feeling that
Mayols,
As you did mention other
people's addresses, we should
there? there must be an easier way of
Swansea.
be glad if you would list our's. Dear ZX Computing, programming the drawing of a • / appreciate your request for
Yours faithfully, As a recent initiate into the line which utilises the slope of more information and programs
fascinating world of home com- the line. Indeed, the program for the beginner. In each issue,
Avril Cowley (Mrs), puting through the purchase of a represented by lines 1000, every effort is made to produce
Rose Cassettes. ZX81, I was so intrigued to see 1010, 1030-50, and 1100 a balance between matrial for
148 Widney Lane, a magazine devoted entirely to (see below) draws a perfectly both the experienced and inex-
Solihull. ZX computing, I bought issue good line providing the slope perienced. / hope that when you
West Midlands B91 3LH. number 3. In many ways K was (Y/X) is less than or equal to 1. read through this magazine, you
a revelation. I had not realized However, for slopes greater will find something to interest
• Sorry about that Avril, these just how many plug-in ac- than 1, gaps appear in the line you.
things do happen. / hope that cessories were now available since only one pixel is plotted for
we have more than made up for nor thought much about some each value of N. When X = 0 (ie
our omission in the review. of the things which could be a vertical line) the computation
done with a ZX computer. It cer- breaks down completely
tainly increased my thirst to pro- because the slope is infinity. The
gress further in the art of pro- problem of X = 0 can easily be
gramming! overcome by a statement such
However, in some ways as:
your magazine was also a disap-
pointment. I appreciate your IF X = 0 THEN LET X = .5
desire to maintain a high stan-
dard for published programs, but Unfortunately, all of my at- What do you think?
this need not imply that only tempts to write a FOR. . . Dear ZX Computing,
long programs are worthy. Yet NEXT loop for a variable Q (of While investigating a bug in a
Thanks a lot! issue 3 contained very few pro- value 0 to the slope of the line), program of mine, I typed in and
Dear ZX Computing, grams suitable for the standard which would allow extra pixels ran the following program.
I don't know if it's possible, but 1K version of the ZX81, and to be plotted at any given value
through your columns I would most of those that were suitable of N, resulted in complications. 10 LET A = 256
like to thank Mr Mike Salem of utilised machine code. Begin- However, the solution of the 20 LET A = A/2
Hilderbay Ltd, 8/10 Parkway, ners lie would-be experts?), on problem was really very simple: 30 PRINT, A
Regents Park, London NW1 finding problems with, or wan- if the slope of the line when 40 IF A - 0.5 THEN STOP
7AA. ting to improve upon, such pro- viewed from the X axis is 50 GOTO 20
I was having problems grams would be faced with greater than 1 (ie Y/X>1), then
loading tapes on my ZX81 and great difficulty because of a lack the line viewed from the Y direc- This printed a series of numbers
when I tried a financial package of understanding of machine tion has a slope less than (ie down the right-hand side of the
from Hilderbay had the same dif- code. Thus, I would appeal to X/Y < 1). Use of this fact allows screen, halving each time.
ficulty. Mike Salem checked out you to put in more material aim- a very simple subroutine to be However, when it got to 0.5 it
the tape I returned and reported ed at the beginner. Good, short written, as follows: did not stop as line 40 com-
back to me and sent me another programs in BASIC, perhaps mands. Upon changing the
tape by return of post with tips with a brief explanation of the 1000 LET X = C - A number 0.5 to 1, it duly stopped
on loading. Needless to say I logic used in them, would be 1010 LET Y = D - B as requested.
have had no more trouble. much appreciated I am sure. 1020 IF ABS Y > = ABS X I also tried VAL"0.5"in the
In fact, I now have a copy of And the space would not be THEN GOTO 1070 place of 0.5, but this too went
Hilderbay's book entitled The wasted; after all, today's IK 1030 FOR N = A TO C STEP wrong. Is it my programming in-
Microcomputer Users' Book of ZX81 enthusiast is tomorrow s SGN X eptitude. or have I stumbled
Tape Recording which I have 48K all-singing, all-dancing 1040 PLOT N, B + Y/X * across another bug in the ROM.
found very comprehensive on all Spectrum owner! (N-AI Yours faithfully,
aspects of recording, tape Perhaps by way of illustra- 1050 NEXT N
recorder and cassette care, tion, I could explain a problem 1060 GOTO 1100 M Clayton,
loading problems, etc, etc. I which occupied me for several 1070 FOR N = B TO D STEP Knaresborough,
think this book has only recently hours recently. I am stilt working SGN Y North Yorkshire.
been published. my way through the ZX81 1080 PLOT A + X /Y *
I very rarely write to BASIC programming manual (N - B),N • / think the 'bug' you have
magazines, but in this case I feel which comas with the computer 1090 NEXT N found is simply due to ZX81 's ^
that I would like to pass on the and have reached Chapter 18. 1 100 RETURN division routines introducing a
83 ZX COMPUTING FE8,MARCH 1 9 8 3 9
WELCOME
decide to purchase a ZX Printer, and therefore have to sell them
slight error in the continuous
division you have asked it to do.
Hold it a minute. . . you will get another PSU this as such.
Remember that if A is not exact- Dear ZX Computing, time with a current rating of This experience brings me to
ly equal to 0.5 in line 40, the While writing programs which 1.2A. You will therefore have a two conclusions: Uncle Clive is
program will not STOP. Try draw pictures on the screen, I superfluous PSU which you will severely lacking in consumer
substituting the following line in- sometimes need to stop a pro- have paid for. relations and WH Smiths should
stead. gram without showing a report I recently spoke to a train their staff property!
code. spokesperson from WH Smiths I would be most interested
40 IF INT (A *2)=1 THEN The method I use is to make who made no secret of the fact to hear other Sinclair users'
STOP sure the computer is in Stow that consumers would end up views on these matters.
mode, then LET L = USR 861. with two PSUs and one of them Yours faithfully,
Hope this has cleared up your To escape from this routine, you would probably be redundant. It
problem. merely press Break. was explained to me that WH Alan Turnbull.
I hope this will be of use to Smiths have to accept packages Stockport,
other ZX81 users. from Sinclair Research 'as is" Cheshire.
Yours faithfully,
Alexander Rogers,
Radlett,
Herts.
Two's company
The bugs are biting Dear ZX Computing,
Dear ZX Computing, I am undergraduate in Computa-
I would like to bring to your at- tion at the University of Man-
tention an error in the otherwise chester Institute of Science and
excellent program Bandit by Technology (UMIST) and have
Messrs. Cleverle and Waring in been an owner of Sinclair
your October/November issue of Research's ZX81 computer
ZX Computing. since March 1982.
This concerns the Hex I bought the ZX81 in kit
loader at the beginning of the form and it was supplied with a
program. Used as listed, it will 1.2A PSU which is able to drive
cause a syntax error on the first the ZX Printer.
input. If line 10 is changed from I initially wanted the com-
INPUT X to LET X = 16514, all puter for hobbyist purposes, but
will be well. recently I decided to put it to
I realise this is a small point, some commercial use. I thus
but one that could easily 'bug- decided that a printer would be
up' a novice programmer in- of some use.
definitely. When I went to WH Smiths'
Yours faithfully. to have a look at one, I noticed
that it was supplied with
Roy Barrett another 1,2A PSU. I queried this
Northlew, at several branches of WH
Devon. Smiths and at one, the assistant
(whom I presume has had some
training) even tried to persuade
me that two PSUs were required
simultaneously.
I realise that many Sinclair
users were provided with a
0.7A PSU with their ZX81s and
thus require an updated 1.2A
PSU to drive the printer and
computer together, but why
cannot Sinclair Research provide
the updated supply with the
computer?
May I make this quite clear
to potential buyers of the ZX81
system: when you buy your
ZX81, you will in all probability
get a 0.7A PSU with your
machine. At a later date, if you
J
983 Z X C O M P U T I N G FEB, M A R C H 1 9 8 3 1
WELCOME
10 FOR N = 20 TO 30
20 LET A = SQR N Simple as 1, 2, 3 good, the program will load nor-
30 PRINT A;" ~ - 5"
40 IF A = 5 THEN PRINT 'THEY
What's your Dear ZX Computing,
mally into the computer, and
often the loading will start to
ARE EQUAL" problem? I was about to Join all those who work if recorded 'from within'.
50 NEXT N Dear ZX Computing, are complaining about the diffi- 7) If the recording is faulty, there
t would like to ask your advice culties with LOAOing. However, are two possible things that
As you can see, when N attains concerning the 16K RAM Pack. in the wake of my 'experiments' could happen:
the value of 25, SQR N should I recently borrowed a 16K RAM to get this operation more i - during loading, the silence
be 5 and the screen should Pack from a friend but I have a reliable. I am persuaded that all pattern appears on the screen.
display the message from line lot of problems trying to load my is not lost. I have discovered a ii - at the end of the loading,
40. programs. way of checking the quality of a the silence pattern appears on
However, this does not hap- I have tried various volume recording, without losing the the screen.
pen. I have even tried this on a and tone settings, but nothing program. 8} If the silence pattern shows
friend's ZX81 just to be certain seems to load. When I load 1K Carry out the following: up, press the Break key. The
it was not a malfunction on my programs, I have to disconnect program which was previously
own machine. the RAM Pack. Please help me. 1) After writing and debugging a in the computer will reappear
The problem can be solved if Yours faithfully, program, save it on a cassette, either immediately or after
you write: preferably 'from within' (with pressing Newline.
Paul Gingell. the SAVE as a program instruc- 9) Now, you can attempt a new
40 IF INT A = 5 THEN PRINT Killiney, tion). SAVE.
"THEY ARE EQUAL" County Dublin. 2) Do not type NEW. 10) Repeat the above steps until
Ireland. 3) Type LOAD and the program al check up to point six are
But then the next declarations name. positive. Now, you have really
won't be accurate. The best • In this issue, Paul, we have 4) Rewind the tape to the begin- SAVEd your program.
solution would be to use the included an article covering ning of the recording, adjust the Good luck!
following lines: some of the problems of volume to the correct level (or Yours faithfully,
LOADing and SA VEing which I what you assume to be the cor-
20 LET A$ = STR$ SQR N hope will be of some help to rect level) and start the tape. Oswald Baruch,
30 PRINT A $ ; ' - - 5 " you. Perhaps you may like to try 5) Press Newline and watch the 20306 Nesher - Givat Amos,
40 IF A$ = "5" THEN PRINT the tip explained in the letter screen. PO Box 1049.
"THEY ARE EQUAL" from Oswald Baruch. 6) If the recording on the tape is Israel.
83 ZX C O M P U T I N G F E 8 , M A R C H 1 9 8 3 11
J
Every computer needs a
[ C H A T T E R B O X ! ]
^ O K Spock, you win this time. . . J S A V E £ £ £ s
for 1 ONLY
SH [ LM
ZX81 SVNT»*SIS
SPECTRUM M i l J1V
NASCOM. VIC. PET. SI UAH I
S»SUW)
BBC. APPLE, TRS80.
IBM. CRAY. ETC.
[ (Please state)
STUART
Herongate. Brentwood. Post to Kempston (Micro) Electronics, Dept 2XC2
Essex C M 13 3SD. England | 180a Bedford Road, Kempston. Bedford MK42 8BL J
S Y S T E M S Ltd Telephone Brentwood (0277) 810244
983
Z X C O M P U T I N GF E B ,M A R C H1 9 8 3 12
ZX81CAME
Numerology
130 NEXT I
14-© L E T N U M = 0
1 5 0 FOR 1=1 TO LEN N$
160 IF N $ « I ) = " - " OR N 5 ( I ; = " . " O
w N $ f l ) = " " T H E N GOTO 160
170 LET NUM=NUM+N(CODE N* (I) -3?
Gary Nugent, from )
16© NEXT I
Dublin, presents a 190 LET C$=STR$
2 0 0 L E T NUM = 0
NUM
fl$<)MN"
THEN RUN
T H E N GOTO 300
330 STOP
Numerology is a program writ- are also catered for. The com- 1000 PRINT TOP * j
ten for a ZX81 with 1 6K RAM puter will then calculate the Full
Pack which will reveal aspects Name Number by allotting each 1010 PRINT R T 3 , 0 . : "I Y O l HRUE RN
of a person's character from letter of the alphabet with a ALMOST B L I N D EX-"
their name. number. Based on the Full Name 1020 PRINT "HUBERANCE, R SELF-EX
Simply type out your name Number, you will see a display CITEMENT - "
lor anyone else's), separating of a character outline for that 1030 PRINT "hN EFFERVESCENCE.. RN
each name Christian name person. RUDRCITY."
and surname - by a space, Try typing your friends' 1CI40 P R I N T "PLERSE C R L M DOWN R B
followed by Newline. IT . "
names in — the results may 1050 P R I N T "YOU CRN S U R P A S S RLL
Hyphenated names and initials surprise you! OTHERS IN"
1060 PRINT "EhSY CHARM. ON T H E U
HOLE YOU"
107O PRINT "ARE P O S I T I V E , HUMORO
US, THE"
1060 PRINT "POSSESSOR Or ENDURIN
G ENERGY."
1090 PRINT "" O N T H E O T H E R H A N D AT
YOUR WORST"
1100 PRINT "YOU CRN BE SELF-RBSC
P6ED TO THE"
1110 PRINT "POINT OF B E I N G POMPO
US . v
J
ZX COMPUTING FEB/MARCH 1 9 8 3 13
ZX81 CAME
TST IC . "
- E N E R G Y " ^ 4-070 PRINT "ORIGINAL RND WARM,
2030 PRINT "CONSPIRE TO ROB MJ.TR ERCEPTIUE"
_ITY 4-060 PRINT "TO A FAULT, ALWAYS
2090 PRINT "CONFIDnNCt . YOU ftKE E E INC- BOTH"
THE COHPROM-" 4.090 P R I N T 'SIDES OF E V E R Y QUEST
£100 PRINT "I5ER WITH A DANGEROU ION. YOU ARE" __ _
= tendency" 4-10O P R I N T "LOYAL ANl> N i C E , tUT
2110 PRINT "TO RETIRE INTO FRNTR ALSO OFTEN"
= \ • f= I t-J- X p " ,
4 110 PRINT "CONTRARY AND TOUCHY.
2120 PRINT "DISCIPLINE PUTS HARD
EDGES ON" 4-120 P R I N T
2130 PRINT "CLOUDS YOU ChN DIaPL 4-130 P R I N T " H S E B M YOUR APTITUDE
"V PRODIG-" IS FOR THE"
2135 PRINT 'IOUS RBIL.IT IE-- . 4.14-0 P R I N T "ARTS AND. STRANGELY
214-0 P R I N T ENOUGH, FOR
21S0 PRINT •• w r a a s f g YOU ARE HPTIS 4-150 P R I N T "POLITICS."
TS , ATHLETES" 4 . 1 6 0 FOP. 1 = 1 T O 550
£150 PRINT "PERPORHEKS OF HLL KX 4-170 NEXT I
• t ^ C- 0 f ;^ C
NDS AND GOOD"
2170 PRINT "SALESMEN." <t 1 9 0 PRINT TAB 7, '
2ISO FOR 1 - 1 TO 750 9 "
2190 NEXT I 4-200 P R I N T AT 3 . 7 ; "ORSON WELLES"
2200 CLS .TAB 7;"NORMAN MAILER",TRB 7 ; " S P
2210 PRINT TAB 7.. IKE MILLIGAN";TAB 7;"NRPOLEAN BO
NAPARTE";TAB 7;"STANLEY KUBRICK"
2220 PRINT RT "KHRL MARX.".;TR ., T A B 7, " J I M C A L L A G H A N " .; T A B 7.; " P R
5 7; "PRBLO PlC'fiSSO"; TRB 7, " S I N G ESIDENT FORD";TAB 7;"SOOTY"
CROSBY" TRB 7; " UERN-PRUL SRRTRE" 4.210 RETURN
..TRB 7; " B E N J A M I N BRITTEN"., TH6 7..
"GENGHIS KHHN";TRB 7;"DR. CRIPPE 5000 PRINT TRB
IN'MHB 7 ; " L E N MURRAY" ; T R B 7 ; " HRR 501O PRINT R T 3 , 0 ; "J
OLD WILSON" THE {UMBER
OF INTELLECT, WIT"
2230 RETURN 5020 PRINT "RND WORDS. SUPREMELY
3000 PRINT TRB 7J ADAPTABLE"
50 30 PRINT "QUICK AND CYNICAL.. F
3010 PRINT RT 3 / 3 ; " E T H I S IS THE IUE TAKES"
WORLDLY NUMBER." 504-0 P R I N T " T H E WORLD AS ITS OYS
3020 PRINT ' T H R E E S n h ' t r Uw£lr-!rUL - p p , ALMOST"
QUICK RND" 5050 PRINT "EVERYONE LIKES R FIU
3030 PRINT " P R O U D . •JOVIAL RND EX 5• NOT A"
-•ANSIVE RND" 5060 PRINT "POWERFUL N JMBER, BUT
304-0 P R I N T " A L E R T , ON T H E S I D E O
A LUCKY"
e LRU AND" 507O PRINT "ONE THE NUMBER OF G
3050 PRINT " O R D E R , R CCU ST 0MED TO
N' M E ^ A N C''1
THE EXER-" 5060 PRINT "GAMBLING, MENTALLY R
3060 PRINT "CISE OF" A U T H O R I T V . C
j I L E , UN-"
ARABLE" 5090 PRINT SENTIMANTAL, VOLRTIL
307 0 PRINT "PEOPLE P G R WHOM THIN 5. HIGHLY"
3 5 GO WELL." 5100 PRINT STRUNG. YOU HAVE A O
3030 PRINT "BUT THEY HAUE OTHER UICK TEMPER"
-AILINGS, AS" _ 5 110 PRINT "AND YOUR CRAVING POP
3O90 PRINT " W H I C H OF US DO NOT7 EXCITEMENT"
"HREE5 CRN" 5 120 PRINT "RND CHANGE CAN LEAD
3100 PRINT "BE INSUFFERABLE IN TO PARANOIA"
=ENSITIUE , " 5130 PRINT "AND EXHAUSTION."
3110 PRINT "HERVYHRNDED RND SURE 514.0 P R I N T
P F I C I R L . " 5150 PRINT ' WHEELS THE BEST OF S
3120 PRINT ~ I NTS- - THE"
3130 PRINT "•MWIriaB YOU W I L L DU W 5IBO PRINT "BEST OF CROOKS., GOOD
ELL IN THE" SPIES,"
314-0 P R I N T "ARMY, THE GOVERNMENT 5170 PRINT "SALESMEN, GAMBLERS A
jp Ci H U L T I - " N O UP. I T E R S . "
3150 PRINT "NRTIONAL I N D U S T H Y . 1' 5180 FOR 1 = 1 TO 55 0
3150 FOR 1=1 TO 550 5 1 9 0 NEXT I
£••170 N E X T I 5200 CLS
5210. P R I N T TAB OT HE
3190 PRINT TRB 7; 1' MSHSb^SZL-HHSHB 3"
5220 PRINT AT 3 . 7 ; BOBBY FISHER"
3.200 P R I N T AT 3 , 7 ; " 7 . E. LRWEREN TAB 7; "VINCENT VAN G O G H " T A B 7.;
CE";TRB 7;"BRRBRRR CASTLE ;AB 7 "ROBIN DAY' . T A B 7; '"JILLIAM SHAKE
. " A R I S T O T L E " ; TAB 7; "GOUGH UrilTLR 5PEARE",TAB' 7, "JANES BOND";TRB 7
ri" ; T A B 7 ; " R O N A L D REAGAN" , ; AS 7 ; " ,"ELTON JOHN";TAB / . " F I D E L CASTR
MICHAEL FOOT" O ".; T A B 7; "CHE GUEVARA".TRB 7, "ST
3 210 RETURN PAUL OF TARSUS"
PRINT TAB 7, NO _
5230 RETURN
6000 P R I N T TAB
4-010 P R I N T AT 3 , 0 ; " B FROM A WORL
~ L Y ST A N D P O I NT , " 5010 PRINT AT 3 , 0 ; " P PPRi" <1
4-020 P R I N T "POURS RRE PROBRBLY T
HE LEAST" SINGLE-MINDED, I N - "
4.030 P R I N T "ABLE TO SUCCEED - SO 6020 P R I N T DUSTRIOUS, MAGNETIC,
PRY ABOUT" THE BORN"
4-04-O P R I N T "THAT. ON T H E OTHER H 6030 PRINT "LEADER. SIXES ATTRAC
RND YOU" T ^iflpH,"
4.05© P R I N T "DON" "T SEEM TO CARE 604-0 P R I N T "DEVOTION. SIXES ARE
MUCH. YOU" PRAGMATIC."
4 060 PRINT "ARE SENSITIVE, IDEAL 5050 PRINT "AND TIRELESSL RESPO
983
Z X C O M P U T I N G FEB, M A R C H 1 9 8 3 14
ZX81 CAME
NSIBLE. THE/" SO4-0 P R I N T "STARES INTO THE BLAC
6060 P R I N T GET HINGS DONE. BUT - 5 5T ABYSS"
T H E 15- IEW " 505O PRINT "OF THEM A L L . THEY AR
5070 PRINT "OF L FE I S OFTEN BLI - AMBITIOUS,"
NKEREO. THEY" r.Qh0 P R I N T "INTIMIDATING.. INTENS
60S0 PRINT " C R N BE RUTH 55 PND 5 . SELF-"
tNSENSITIUE . " =070 PRINT "RIGHTOUS WITH A PASS
*090 PRINT "SMOOTHLY PUSHING OPP TON FOR"
ISITiON FROM" 5OS0 PRINT "JUSTICE. THEY TEND T
=100 PRINT "THEIR PATH. T GREAT"
•-•HO PRINT O PRINT " S U C C E S S AND FAILURE,
5120 PRINT THEY DO UELL -1PE OFTEN"
TN A L M O S T " 6100 PRINT " A L O N E AND MI5UNDERST
5130 PRINT fiNVTMING. LftW I S PAR :-CD. TO"
TCULhRLY" 5110 PRINT "SOME EYES E I G H T IS T
514-0 P R I N T GOOD. SO ARE MOST F I —E LEAST"
E L D S OF 5120 PRINT "ATTRACTIVE NUMBER BU
5 I S O PC* I N T BUSINESS - APPARENTLY"
5 1 6 0 FOR 1=1 TN 5F,G 5 1 3 0 PRINT "THER ARE GREAT I'MP
5173 k J
E-<T I ENSATIONS."
5180 :*LS 514.0 PRINT
6190 PRINT TAB ~, ' 6150 PRINT WORK THEY ARE THE
SCHOLAR
620© P R I N T AT 3 . 7 : • MARGARET THAT 5160 PRINT "HISTORIANS AND PHILO
CHER"., T A B 7 . EDWARD H E A T H " . T A B 7 rOPHERS,"
.."INDIRH GHANDI . TAE- 7 , DANNY LP 5170 P R I N T "THOUGH THEY ALSO DO
RUE"; TAB 7, " B R I G G I T E BfiRDuT" ; T P ;-!ELL IN"
5 7; " J I M S L A T E R " , T A B 7. ' ALBERT F 5ISO PRINT "COALMINES AND ON F A R
INNEY". TAB 7; MAO T S E TUNC-" MS. THEY"
52IO RETURN 6190 P R I N T " S O ARE HAPPY IN PUBL
7 O 0 O P R I N T T A B 7.: X5HING. RE-"
5200 PRINT " U I E W I N G AND INSPECTI
7 0 I O P R I N T AT 3 , 3 ; " L
5E R C T I U E AND THEY" 52IO FOR 1=1 TO 7SO
7020 P R I N T " C A N BE S O L I T A R Y , THE '220 NEXT I
Qpji.j •• =-30 CLS
7O30 P R I N T "ARTISTIC AND THEY CA 624-0 PRINT TAB 7;
BE I N h R T - "
7040 PRINT "ICULATE. THEY ARE US 5250 PRINT AT 3 , 7 , " W I N S T O N CHURC
JALLY GOOD" HILL".TAB 7;"ERIC MORECAMBE".TAB
7O50 P R I N T ' L O O K I N G AND A T T R A C T I 7 , " R I C H A R D BURTON".; T A B 7 , " j . B.
-<E, BUT T H E Y " P R I E S T L E Y " . T A B 7 ; " J O E B U O N E R " ," T
7060 PRINT ARE O F T E N SHY AND SE AB 7 , ' L E O N I D B R E Z H N E U " ; T A B 7 ; " I D
*UALLY IN-" I AMIN"
707O P R I N T " H I B I T ED . S T I L L . . YOU 52BO RETURN
r EUENS GET" 9 0 0 0 PRINT TAB 7,
70SO P R I N T "THINGS DONE, APE UER 3 0 1 0 P R I N T AT 3 , 3 ; " • DYNAMIC.ST
f RELIABLE" PONG, HAGNETIC, YOU"
709O P R I N T "AND DON" "T MESS AROU 9020 PRINT " S T R I D E THROUGH LIFE
AND OTHERS"
MD . "
710O PRINT 9030 PRINT "STAND A S I D E . YOU ARE
7110 PRINT • MFrairew Y O U W O U L D ENJ LARGER THAN"
904-0 P R I N T "LIFE, LUCKY, CAPABLE
OY A L I F E " EFFECTIUE"
7120 PRINT "ABROAD WITH TRAUEL. 9050 PRINT "AND ALWAYS IN THE TH
- (-) T Q BA " •r p OF XT " *
7130~PRINT "YOU""LL DO W E L L THER 9060"PRINT "YOU ARE IMPULSIVE AN
E HN T H F **
7- Q U I C K - "
714-0 P R I N T "OTHER HAND YOU COULD 9O70 PRINT "TEMPERED TOO. STILL
TURN OUT T O " _ THAT CHAR-"
7150 PRINT "BE R MUSICIHN, H POE 9060 PRINT "ISMA CHARMS ALMOST E
T OP A" VERYONE. YOU"
7160 PRINT "PAINTER., H MYSTIC OR 9090 PRINT " C A N HAUE BLACK MOODS
A CLERGY BUT WHEN"
7 1 7 0 1 - PR I N T "MAN. IF v'OU G O INTO 9100 PRINT "YOU ARE F E E L I N G CONF
BUSINESS" IDENT (WHICH"
"ISO PRINT "YOU W I L L PROBABLE EN
t- UP B O S S . " 9 11G P R I N T " 1 5 MOST OF T H E TIME)
""190 F O R 1 = 1 T O 50O NOTHING CAN"
" 2 0 0 NEXT I 9120 PRINT "STAND I N YOUR WAY."
"210 CL5 _ __ 9 130 p r i n t
9140 PRINT "MBHiaaB YOU MAKE FINE
SOLDIERS."
7230 PRINT AT 3 , 7 , " H E N R Y KISSING 9150 PRINT " A T H L E T E S AND POLITIC
ER".;TAB 7 'GERMAINE GREER" ;TAB 7 TANS,"
,"ABRAHAM L I N C O L N " , T A B 7."NICK J 9 1 6 0 FOR 1 = 1 T O BOO
AGGER", TAB 7 ; "GEORGE BERNARD SHA 9 170 NEXT I
W" - T A B ; "MALCOLM HUGGERIDGE" . TA 91SO CLS
= 7;"TONY BENN" 9 1 9 0 PRINT TAB 7 . '
724.0 R E T U R N
6000 PRINT TAB 7 . J B H M E ^ S B l =•200 P R I N T AT 3 , 7 . ; " J A C K KENNEDY"
;TAB 7.; " E L U I S PRESLEY" , TAB 7, "EZ
S 0 1 0 P R I N T A T 2 . 0 : "I H NUMBER OF RA P O U N D " , T A B 7;"TOM JONES" TAB
INCREDIBLE, INEX- 7,"RUDOLPH UALENTINO";TAB 7 R A L_
•5020 P R I N T "ORABLE POWER, EIGHT PH N A D E R " , T A B 7; " JOHN BET IEMAN " ;
PONDERS" TAB 7 , " J A C K I E ONASSIS",TAB 7;"TH
303© PRINT "SLOWLY, MOUE IMPLACA 5 OUEEN"
ELY.. AND" 9210 RETURN
J
15 ZX COMPUTING FEB, M A R C H 1 9 8 3 15
ZX81 CAME
Space adventure
Fourteen year old David Lambert delves into outer
space with a great program for the 16K ZX81. All you
have to do is reach Earth before the aliens get you...
Space Adventure is a game for resort, scuttle your ship. they might have their protective be rewarded with a 'Well done'
the ZX81 with 1 6K RAM Pack. However, if you take evasive ac- shields up to deflect your message which is generated in
You are travelling in a space ship tion, you will use up more fuel missile. If they do have their lines 2070 to 2130. You will
journeying back to mother than if you increased your shields up, it is very likely they also be told how many aliens
Earth. The trouble is that there speed. You only have a limited will fire at you so be prepared for you managed to do away with
are a number of nasty aliens who amount of fuel so care must be quick evasive action, on your trip home.
are out to get you! taken in your choice. If you have Here is a table of the variables
You first choose how long not enough fuel to finish the run All's well.. . used in the program to help you
you wish the game to last, then to Earth, you will get a message There are several ways for the follow how David has put the
your fuel and estimated time of on the screen warning you of game to end: your ship could be listing together.
arrival are calculated in lines 3 this and you will have to leap in- blown up; you could scuttle your
and 4. When an alien ap- to hyperspace to get your own ship; you could run out of
proaches, you will get a warning estimated time of arrival down. fuel; your engines could F - Fuel.
on screen and it is then up to you Your star ship also has the overheat; or the explosive E — Estimated time of ar-
to choose your course of action. capability to fire missiles at any missiles you are carrying could rival.
You can either increase your annoying aliens, but be warned, accidentally be triggered. Of K - Kills.
speed, take evasive action, if you score a direct hit the aliens course, if you manage to reach T — Temperature.
enter hyperspace or, as a last will not always be blown up — Earth after your journey you wilt TRAV Game length.
16 ZX C O M P U T I N G FEB, M A R C H 1 9 8 3
122 PRINT RT 15.0.;" COMPUTER P.
ERD OUT"
1 S 3 P 9 I M T prr 1 3 . 0 ; " P R E S S T XF T
£MP IS 5 0 OR CUER"
130 PRINT RT 17 FUEL ETR K
ILLS TEMP "
1 4 © PRINT RT I S . C F .. R T i O
T 1 © j. l i ; K ; f i T 1 6 . 1 6 ' T
14-5 L E T F = F - 4
147 LET E-E-4.
150 LET RND=INT ( R N D * S >
151 I F E >F T H E N PRINT RT 16 O .
E NC'UGH TO REACH ETR
152 LET EX=INT ( R N O -k 2 0 i
153 IF E X = 5 T H E N GOTO 6 5 1
1 5 4 . IF T =70 THEN GOSUE 3300
155 IF F < = 0 THBN GOTO 1500
156 IF E<=0 THEN GOTO
160 IF R N D s 4 THEN GOTO 160
170 GOTO 130
180 FOR R=1 TO 10
190 PRINT RT £ 0 . 0 ALIEN I N Sr.
CRNNER RANGE"
200 PRINT RT 2 0 . 0
SlO NEXT R
215 CLS
220 FOR R = 1 TO
221 CLS
222 PRINT
223 PRINT
*
224- PRINT
225 PRINT
O
226 PRINT
RT 10 0.
230 PRINT
240 PRINT RT 1 1 G. O
*
wfwMaianTT *
*m
pkint "hou l o n g t o t r r u e l 250 PRINT RT 1 2 0.
T O 3 © " IWiTTTfTTIintlTw
o
INPUT TRfiU 260 PRINT RT 14 . 0
LET f =TRRUtlO 1 r -
4 LET E = T R R U * 9 270 NEXT R
5 LET K = © 280 PRINT
6 LET T = 30 290 PRINT " A L E R T "
CLS 300 PRINT " A L I E N . t ' O U R O F T I G
B 1© PRINT YOU RRE T H E COMRNDER NS RRE"
| OF S T A R " 310 PRINT " H i TAKE EWlSIUE ACV
£ 20 PRINT SHIP (R1 D2CULT>. I ION. "
T I S ON ITS URY T O P L R N E T TRERH 320 PRINT " i 2 ) INCREASE SPEED."
. U E KNOW THIS PLANET RS ERRT 330 PRINT "4 3) SCUTTLE"
H. YOU RRE 5HIPING EXPLOSIVES, 34.0 P R I N T " t4> HYPERSPACE ORIUir.
I -. THEY
MINUTE"
C O U L D GO O F F RT ANY
o 350 IF INKEY $ - " 1" THEN GOTO 50O
if 30 PRINT " YOU COULD MEET U P L' 360 IF INKEY$="3" THEN GOTO
ITH L O N G T E N S ON T H E URY. THEY RR 370 IF I N K E V* $ = " 2 " T H E N GOTO 5St
£ NOT UERY NICE ALIENS TO MEET 371 IF 2NKEY$="4" THEN GOTO 30O
UP U I T H IF THEY GET T H E CHRNCE 0
I|
FIRST THEY U ILL OPEN F I R E ON Y 375 GOTO 350
OU. YOU W I L L HAUE P R I R E UORNING 360 CLS
SEFORE THIS HAPPENS. " 381 PRINT "INPUT NEU SPEED"
31 PRINT "B E U R R E . UHEN YOU TAK 390 INPUT SP
E EURSIUE RCTION YOU USE UP.L 400 LET RET=INT (RND *3>
O T S OF FUEL THE ONLY URY TO GET 4 10 IF RET=2 THEN CLS
THIS BACK I S T O GO I N T O HYPER 420 IF RET=2 THEN PRINT "ALIEN
SPACE DRIUE THIS UILL A D D ON TO CL05EING"
YOUR ETR." 430 IF R E T = 2 THEN GOTO 360
4.0 R R I N T " 4 40 LET RET=INT IRND*9>
450 IF RET=5 THEN CLS
50 IF INKEY$= THEN GOTO 460 IF RET =5 THEN P R I N T "YOUR f\
50 CLS ERCTER HRS BLOWN UP"
70 PRINT ". 465 IF RET =5 THEN GOTO 65^5
470 CLS
so PRINT " m 480 GOTO 70
* * 500 CLS
90 PRINT " i . 1 505 PRINT "YOU RRE T A K I N G EUASI
UE ACTION"
io© PRINT " 510 PRINT "YOU OPTIONS ARE."
* *
520 PRINT "(1> FIRE MISSILE"
i i o PRINT " 530 PRINT " ( 2 ) INCREASE S P E E D ^ V
12© PRINT " 540 PRINT "<3) FIRE LAZERS" W
1983 ZX C O M P U T I N G FEB M A R C H 1 9 8 3 17
ZX81 CAME
550 IF INKEV$="1" T H E N GOTO ?0Q 1 0 9 0 NEXT A
56© IF INKEY$="2" T H E N GOTO 80Q 1091 LET F - F - 5
570 IF INKEY$="3" T H E N GOTO 900 1 1 0 0 GOTO 660
590 GOTO 550 1500 CLS
600 CLS 1510 PRINT "YOU HAUE RON R I G H T
610 PRINT "YOU RRE GOING TO KIL. UT OF FUEL"
L RLL THE" 1520 PRINT " Y O U L U L L D R I F T I N SF
62© P R I N T "MEMBERS OF YOUR CREW RCE F OR"
RRE YOU " 153© PRINT " E U E R RND EUER
630 P R I N T " S U R E YOU URNT TO DO
THAT" 154© PRINT " D O YOU UANT T O TRY A
64-0 I N P U T SS£$ GAIN"
650 IF INKEY$="N" THEN GOTO ?© 1550 IF INKEY$="Y" THEN RUN
651 CLS EX 1560 IF INKEY$="N" THEN STOP
652 IF EX = 5 T H E N P R I N T "YOUR 1 5 7 0 GOTO 1550
PLOSIUES UENT O F F " 2000 CLS
653 PRUSE 100 201© PRINT " Y O U HAUE MRDE IT TO
Geo CLS TRERH" I
6 6 3 FOR A = 1 T O 6 2 0 2 0 PRINT "SCREEN UILL GO BLANK
664 CLS WHILE I"
665 PRINT RT 10.10 2030 PRINT "THINK. P L E A S E DO NOT
666 PRINT " t <i O > ) > " PRESS "
670 PRINT " < -F3." 2040 PRINT "BREAK UHILE I RM DOI
680 PRINT " g M l S j " NG T H I S . "
665 PRINT " | V i ? S " 2050 PRINT "THANKYOU. NOU PRESS
666 PRINT " ( ( ( < ) > ) > " RNY KEY"
6 9 0 NEXT R 2055 IF INKEY$="" T H E N GOTO 2055
692 PRINT "YOU RRE DEAD 2©60 CLS
• • 2070 FAST
694 STOP 2060 FOR I=-4 TO 4
700 CLS 2090 FOR J = © TO 120
710 PRINT RT 1 7 . 0 . " 1 ;; 2100 PLOT 3 2 + 2 0 * 5 I N 1 1 + < J / 6 0 * P I 'f
720 PRINT RT 1 6 , 0 . " ) .22+20*CGS ( J / 6 0 f P I f l / 4 j t P I i
730 PRINT RT 1 9 , 0 . " 2 1 1 0 NEXT U
2120 NEXT I
740 PRINT RT 2 0 . 0 , " I I 2130 PRINT "WELL DONE"
750 FOR R = 1 TO 21 2140 IF K : 0 THEN PRINT "YOU KILL
760 SCROLL ED " ; K . " RLIEN5"
7 7 0 NEXT R 2150 STOP
777 LET F=F-5 2700 PRINT wYOUR E N G I N E S H A V E OV-
780 LET RND=INT * R N D 10) ER HEATED"
7 9 0 GOTO 610 2710 STOP
8 0 0 GOTO 36© 3 0 0 0 FOR A = 1 TO S
810 IF RND=5 THEN PRINT "ALIEN 3001 CLS
HAD S H I E L D UP" 3002 PRINT ". ; "
811 I F RND =5 T H E N S C R O L L 3003 PRINT " . ,. : * * "
820
FIRES
IF RND =5 T H E N P R I N T
RT YOU
H E NOW 3004
. PRINT "
»» ** O . ;
830 IF RND = 5 T H E N GOTO 1000 30i© PRINT * :
8 3 1 CLS *
8 3 2 FOR C = 1 TO 6 3020 PRINT " . ; O
833 PRINT RT 6,1! . »»
634 PRINT AT 9,1! 3030 PRINT " ;
635 PRINT AT 10,15,"
836 CLS 3040 PRINT
637 NEXT C 305O PRINT " O
840 PRINT .»
845 P « XNT 3060 PRINT
850 PRINT
860 PRINT
" A L I E N NOW
" Y O U C R ^ KNOU
GONE."
CONTINU
3070 PRINT
. »" *-*• .;
E UITH TRIP" 3060 PR INT " . , ; ::
362 PRINT "BUT REMEMBER THAT YO
« %%
J
Z X C O M P U T I N G FEB, M A R C H 1 9 8 3 18
48K SPECTRUM
Ship of the Line
48K version features the chance to send out boarding parries, to build up
pn/e money, to take intelligence tests and to bribe your way up the
admiralty ladder' This greatly extended version of Ship of the Line really
makes the most of your extra memory £6.50
t6K ZX81
48K SPECTRUM Bargain Bytes Cassette One
Shaken Deep Sea Adventure ' Bank Account * Underground Adventure *
Deptncharge * Hangman • Loan Calculator * Codebreaker * Foreign
But Not Currency Calculator A genuine bargain'
48K SPECTRUM
Transylvan ian Tower Despatch within 48 Hours
A spine-chilling adventure with spectacular 3-D graphics Guaranteed.
Can you rid the world of Count Dracula before he All tapes despatched by
introduces you to the dark world of the living dead? Horror First C I « i Post.
film addicts will know most of the moves, but we've also
added a few of our own" Can you discover the mystery of
the turret and escape with its treasures?
Enter via the dungeons and work your way up to the ter-
rifying top' Find objects to help you whilst exploring the
500 rooms ail m exciting 3-D detail - but watch out for the
bats
Give your Spectrum a bite of the action now'
Includes full save routine for use during the daylight
hoursl £6.50
I6K SPECTRUM
Ship of the Line
An Adventurous Management Game
Command a 17th Century sailing ship win victories for Britain
juggle your supplies, manpower and ammunition
fearlessly battle your way up the ranks and finally achieve
promotion to First Sea Lord, but beware it won't be easyi
Encounter and engage enemy fleets survive sunstroke,
fever and famine endure fire, fog and thirst then
when you think you've done well rush Dack to Port
for promotion i With full colour, ship graphics and
sound £4.95
On the cards
There are ten main options
numbered 0 - 9 which may be
used. Card Entries, Card Altera-
tion, Card Delete, Section En-
tries and Section Name Change,
do just as their titles suggest and
This file card program was broken up into sections, eg and enter the bulk of the infor- instructions are printed up by
designed to suit almost any re- Name, Address, County, mation later. After answering the program for the various
quirements of storing useful in- Telephone Number, etc. You the number of cards required, modes as they are used (as in all
formation using a 16K ZX81. will therefore be asked how the computer will ask you to in- the options). Card Delete,
Great effort had been made to many sections are required. In put information on each section however, will shift all the later
keep the programming minimal the above example, we would name in turn, onto Card 1. This cards forward one card thus the
(to save memory storage space) need four of course, but the continues until the number of numbering will change leaving
and keep all the required func- cards may equally be used for cards required are completed. the spare card at the end of the
tions. The program had afso to Stock Number, Part Description, Entries Onto the cards is fairly file. Card List will ask for a card
be easily usable by anyone, call- Price, Quantity or Song Title, straightforward - you simply number and display the contents
ing for clear instructions and Record Label, Artist, etc. The enter the words or characters in- of any single card entered. List
fool-proof entries. number of sections is only to the string prompt, then press All Cards will list the name of all
The program allows up to limited to the number of Newline. This is the case with all the sections (numbered) then
10K of usable storage space. characters allowed per card, and inputs. The length of each entry list the first line's worth of
You can, for example, have 100 extra sections can, of course, be is only limited to 255 characters characters on each card. A blank
file cards, allowing up to 100 added in later on in the program. (or the number of characters space is inserted between each
characters per card (100 x 100 allowable on the card, should section should there be several
= 10,000). You may require this be less). For example, if we sections in the line (as may be
50 cards with 200 characters what's in a name? have a section called Name and the case in Part Numbers, etc).
per card, or 250 cards with 40 The program will then ask you to we enter 'Joe Bloggs' then this Card Search will search for,
characters. You may use any name each section one at a section will build up one and display all the cards which
combination making up the time. The section names as in character at a time until it is ten contain your search word/
10K. You can also choose less the first example, Name, Ad- characters wide to accept this characters within a particular
than this, eg 50 cards at 150 dress, etc, should be kept down entry including the space. A section. This will display the
characters if you wish; this to 1 5 characters in length. This space 10 characters wide will number of and the first line's
shortens the taping out time, or is because these names are used now be assumed on every card worth of characters of the card.
taping back time, which can as keywords for the Card Entries for the 'Name' section. You can therefore search for a
take up to seven minutes with a mode and longer names will If on another card, a longer person's name to get the card
full system. simply get their ends chopped name should be entered, say number of that entry, or for a
Running the program is quite off after 1 5 characters. No harm 'David Appleby' then this sec- county to get names of all en-
straightforward. Firstly, you will can be done by this and you can tion will expand until it reaches tries living in a particular area,
be asked to give the program a change the section names later the end of the name. It will pad etc. The search ends with a
name. This is used for the taping on should you enter a longer out the 'Joe Bloggs' and shorter 'Finish' just in case your search
out routine and the Report Page. name. Punctuation, inverse names entered with blank is fruitless.
Still in the Setting Up mode, you characters and graphics may be spaces behind, shifting any Section Trim will cut one
will next be asked how many used in these names or on the following sections along the character off the section
cards you require and your limit Card Entries if required. card so that they all line up. Each specified. If you decide to ab-
of maximum characters per Next comes the Card Entries section, therefore, will assume breviate long entries to leave
card. mode. It is a good idea to only the greatest length entry into more room on the card, the sec-
This is followed by a Section enter one or two cards first time that section for its number of tion must be trimmed down as it
Entries mode. Each file card is around to check the system. characters width. It is because has already assumed a max-
J
20 ZX C O M P U T I N G FEB/MARCH 1 9 8 3
ZX81 — DOMESTIC
imum length that is no longer re- entries takes about 1 2 seconds card in the form of character from lines 1 70 to 1 80.
quired. to search and display. codes, so the maximum Lines 700 708 Reset E,F,G
Section Order Change will allowable entry into any one and H. The E and F variables are
take the section number The program section is restricted to 255 used to hold the number of the
specified and put it as the first characters. beginning and end characters of
Care should be taken entering
item on your card; the section D$ holds the Section Names. a particular section name.
this program as the memory
numbering will be altered accor- E$ holds the length of the Sec- Lines 7 1 0 - 7 1 4 These are
saving techniques used make it
dingly. You can therefore move tion Names (and also uses repeatedly used to add up the
very complex to read.
the sections into any order you character codes). character codes in E$ until the
The variables 1=1, Q = 0,
wish one at a time. It should be Line 1 32 Prints the report page. correct section name is put into
J = 710, K = 800, T = 1000,
noted that in the Card Listing Line 146 GOSUB K (starts at A$(10). The G and H variables
L = 2, M = 7 and N = 20, remain
modes, should the information line 800) is a more simple input are used to interrogate the
constant throughout the pro-
fill the screen, then Newline will G$ routine. The variable P is us- codes of C$ in the same manner
gram and simply substitute
clear the screen and continue ed as a counter in this routine. It to find the beginning and end
these numbers to save memory.
the listings until the task is com- is only used when any listings position of an entry.
A$ is dimensioned 30 by 15
pleted. are required and is reset in the V, W, X, Y and Z are used as
characters in length. This holds
Slow and Fast modes are Option mode, line 164. When temporary variables in FOR
all the phrases that make up the
available from the Options 22 lines have been completed TO loops, etc, in the various
instructions (the spacings
mode. Fast is useful for listings. GOSUB K (800) will CLS after routines ending in a 'don't care'
should be followed to get the
Slow for entries. 'T' tapes out input and add 22 to P allowing state when the program returns
correct displays). A$(1) and
the program, puts the recorder the next 22 line page to be to the Option mode.
A$<10) are left blank, AS{1) to
to record and play first, then displayed. Other variables used are:
blank the displays and A$|10)
enter 'T\ If the program tapes to hold the section names; the Lines 1 5 0 - 1 8 0 Print out the
out before you are prepared, latter is updated during the pro- options and are the centre con- C — Number of sections
leave it to tape out as it will gram. Incidentally, this is why trol to which all the other entered.
return to the Option mode after section names should be limited routines return. If a number 0 to D — Number of cards used.
this so you can tape out as to 1 5 characters. 9 is entered then it will send the R Number of unused char-
many times as you wish. program to this number * 50 acters left on the card.
The main printing routine is
After all the options, the pro- + 200. So the various options
the input routine at line 1000.
gram will return to the Option programs are numbered in steps
This draws the box, top centre
mode. If you enter Newline of 50 from 200 to 650 in the Quite a lot of usage is made of
of screen and prints in it; this is
alone then the program will give same order as printed. The ex- the open ended 'TO' as in line
then followed by the instruc-
you back the Report Page mode. ceptions are the Slow/Fast, tape 378. I must admit this looks
tions. If extra instructions are re-
The program will not come out out, sort routine, and the strange but it is quite legal as ex
quired, the routine may start at
of this loop until it is turned off. Newline command for the plained in the Sinclair manual,
lines 900 or 950. Most of the
If you wish to start a new file Report Page, which can be seen page 137.
options use this routine and a
card program then you must coded message tells the routine
press Break whilst it is busy, what to print and what the input
then RUN. side of it can accept. H$ holds Where you see '{space)' leave the number of spaces indicated
the coded message and G$ is within the brackets. When you type in some of the other graphics
Illegal entry used as the input string. For ex- characters within brackets, here is a guide to what you should see
ample, lines 104 to 108 ask on the screen.
Various error messages and how many cards are
traps are used in the program to required, show the Setting Up
saving prevent illegal entries. If a mode in the box and expect a Shifted graphic 1
of the mistake is made in the program- numerical answer. If the first
a card ming and an error report comes character in H$ does not equal Shifted graphic 5 E
Hents up, check and alter the program "0' then a number is expected.
I List as required then enter a direct The value of this first character Shifted graphic 6 65
! of all command GOTO 130. This will is the maximum acceptable; in
then save any information being lost. Shifted graphic 7 LJ
this case 'T' = 1000 maximum
th of An alphanumeric sort of pro- cards are allowed. The second
blank gram sorts the contents of the character in H$ holds the error Shifted graphic 8 a
each cards from the first section, re- message code for the print
everal numbering each card into alpha- Shifted graphic E
routine. The third character is
ay be numeric order. This part of the the mode printed in the box,
etc), program has been put in as an leaving four phrase codes to Shifted graphic Q
h for, optional extra, although I will ad- make up the instructions, ie 1
which vise it is worth the extra work. Shifted graphic R
- 0 - 3 - 4 = "PLEASE
word/ This option should be entered ENTER" "BLANK" (twice) then
icular after the main program has been "THE NUMBER OF" "CARDS Shifted graphic W
r the checked and tested. Break REQUIRED". The value of these
line's whilst running and add in the ex- numbers (+ 1) are taken from
8 LET R-VAL "1"
card, tra program lines, then RUN. A$. 10
for a The program will stop at line 81.
LET Q . I - I
¥
card
12 71j"
Lines 8 to 81 inclusive must
LET J=VAL
for a now be deleted to give you back Line by line IFC LET K-VAL
II en- the 10K of memory for the Line 102 F$ holds the program 16 LTT T=VAL -Iff<fm
matically presume the Fast Line 120 B is the maximum DIM AY{.<J.K/L,N-«»L)
mode when 'S' is selected. Sor- number of characters per card. 2t LET A/(LJ "PLEASE EF.'TES
ting 200 entries, 50 characters Line 124 B$ is dimensioned and LET A / G - I ) -I T.:;- :;AKE o r "
long, takes just over three holds the cards contents. ;•/ L E T A/{L-L)T"(I JAACTO THE N U H E E B OF"
minutes. Obviously, less entries Line 92 C$ initially holds the J2 LET A / ( K - L ) - " C A R D S REQUIRED. »
ZX COMPUTING FEB/MARCH 1 9 8 3 21
ZX81 — DOMESTIC
U0 LET A/(L.M)«"VORD OR C K R / . " 212 PJUWT A/(H*J) ;•- (1 =r>ac*J":W:"."...
b2 LET AJ(H'H~L)."(Z spaces) 5ETTING UP" 21* POP X - I TO C
bb LET A / ( N - H - l ) « " f 3 tO»C*t) CARD LJST" 210 GOSUB J
b6 LET ARFRH-tfU" f2 t H C t a l CARD SEARCH" 218 LET p . p - I N T ( ( H - G j / V A L "32"J
••0 LET A Y ( L ' H ) * * ( 2 spaces) CARD DELETE" 220 IP X>.P/(l-L} THEN GOSUB K
50 LET A / ( H - H . L ) . » f I scace) CARD ENTRIES" 222 PRINT A / ( N / L ) ;TAB L . I ; 8 / ( W , G TO H)
52 LET A / ( N - 1 ^ L ) . " C A R D ALTERATION" 22b PRINT
5b LKT A ^ f K - L - g ) « * f l i m h ] SECTION TRIM" 220 NEXT X
50 LET A / ( K - L } - - ( i _ i £ A £ £ ) (1 - c a c o ) !UKE CHANOE* 228 OOSUB K
58 LET A / ( N - I ) - " S . fl smct) ORDER CHANCE" 210 RETURN
-0 LET A / ( N ) . " S E C T I O N ESilRIES" 250 LET H / . " C 9 2 1 6 / / "
u2 LET A / ( N . I ) = " L I S T ALL CARDS." 252 OOSUB T
6b LET A / ( M . L ) a " (2 t e x t s ) T> TAPE OUT" 25b POP X = I TO VAL 0 /
t>6 LET A0 (N*L*I)s "D/F= SLOW/FAST" 256 GOSUB J
<••8 LET A / ( N . L . L ) . "THIS P I L E SET. " 258 NEXT X
70 LET A / ( N « M - L } « "KAX.NO.OF CHR/. " 260 LET "0221600"
72 LET A / ( N . M - I ) = "REQ. (j scacc) PER CARD. * 202 GOSUB T
7b LET A / ( N . H > . " " P L E A S E W A I T " " 26b DIH I/(I,K-G.I)
7u LET A / ( N . H . I ) . "EXCEEDS NO. Q _ £ £ £ £ £ > OP* 266 LET I / ( I J = G/
76 LET A/(K.K.L) = "PLEASE RE-ENTER" 208 CLS
«/ LET V < N W I / L ) . " J . E . (1 space) P I I , £ CARD" 27/ POP y . I TO D
82 LET C~Q 272 If 1 / ( I J O B / ( * , 0 TO H> TKEJ) LET rf-1
at LET D - f l 27b I P I / ( l J - U / { y , G TO THEN PRINT Y ; " : " ; B / ( Y , TO N . M - l )
86 LET P=$ 276 I P y . P TliEN GOSUB K
88 LET Y= VAL " 2 3 " 278 NEXT r
90 LET Z / r » b 3 3 2 1 2 2 1 1 1 " 28/ PRINT "(PINISHj"
92 LET C / . " f s h i f t e d g r a p h i c 1)" 282 GOSUB K
9>* LET E / - C / 28b RETURN
96 LET D / - "" 3// LET K / . " O b 3 1 7 / / "
98 LET H/* "000102Y" 302 GOSUB T
100 GOSUB T 3/b FOR X-VAL G/ TO D - I
102 LET F/-0/ 3/'- LET B0(X)-B0(X~I)
10^ LET 3/8 NEXT X
106 GOSUB T 31/ LET B0 (X) = ""
106 L E T A . V A L 00 312 LET R = R . I
110 LET X.T*N/L/A JIT LET D - D - 1
112 LET y . y . i 31o RETURN
116 LET z * y . i 35/ LET WrA-D
lis LET H/-'X0010YZ" 352 LET H / - " W b i l / 3 b "
118 OOSUB T 35b OOSUB T
120 L E T B- V A L C / 35<- FOR M 1 0 VAL G/
122 LET R . B 358 LET D - D . I
12^ DIM B/(A,B) 300 LET W=D
126 GOSUB VAL "000' 3"2 GOSUB VAL '100"
128 QOSUB VAL "350' 3^ FOR X « I TO C
130 CLS 366 OOSUB J
132 P R I N T T A B M - L : A / ( N . N / L ; . . . A / ( N . L . L > i P / . , , A / ( N - H . L . L T O ) ,D. . , 3T>8 LET H/- "00t>l?00"
13<* PRINT A / 0 0 * C . . , A / ( N . M - L ) ; B , , , A / ( L . L . L TO J ; A / ( « - L , TOM-IJiA... 37/ GOSUB VAL " ; > / / "
136 PRINT "LENGTH OP (1 <-pac») * ; A / ( N ) . . . 372 I F LEW 00"CODE C / C X - I > R THDJ GOTO VAL "3'-«"
138 POP X ' L TO LEN C / 37b I F CODE C / ( X . I J > . L E N 00 THE.V GOTO VAL -390*
W PRINT CODE C0(X)}"; 376 FOR Z - 1 TO D
1*2 NEXT X 378 LET B / ( Z J = B / ( Z , TO H ) . " ^ " . B / ( Z . H . I TO )
lbb PRINT AT N . L . L ; " (NEW-LINE TO CONTINUE. ) " 36/ NEXT Z
lb6 0OIL'S K 382 LET C / ( X . I ) = C H R / (CODE C / ( X . i ; . I J
150 CLS 38b LET HcH+I
152 PRINT "OPTIONS' (Note: "Ontton;" » i n i n v e r s e CHR/J 38c LET R - R - I
15^ FOR x - c TO M . L 388 GOTO VAL "37^"
156 PRINT "(7 naco.-)*:X: • — • : A / ( x . N - M - I . VAL Z / ( X . I ) TO ) , , , 390 LET B / ( W , 0TOH)*GM
158 NEXT X 392 NEXT X
1--0 PRINT A / f N . L ) , A / { N . L . I ) 391" NEXT Y
162 GOSUB VAL "7//" RETURN
lob LET P.Q W LET H / - " D b 5 1 7 / / "
166 GOSUB K OOSUB T
lufl I F 00*" THEN GOTO VAL " 1 3 / " U U
t 00
LET Vs VAL
170 IP 0/(l)>"." AND G / { I ) < " A » THEN OOSUB VAL 0 / ( 1 ) " VAL " 5 / " . T - K k 6
0 LET H0''C951O00'
I P G / - " F " THEN PAST GOSUB T
17 2
17b IP 00= "D" THEN SLOW FOR X ; I TO VAL 00
176 I P G / - " T f THEN GOTO J ' L 4 1 2 OOSUB J
178 (Thla l i n e l«ft blank f o r the a o r t option) I F X . VAL 00 THEN 00TO VAL "368"
J
ZX81 — DOMESTIC
FQR y . I TO D 80'- RETURN
<•62 LET i)/(y)-u/(y, TO K - i j . b / ( y r H . i TO ) >00 PRXNT AT H-I.9;A/(H*l) ;W
U&k NEXT y 902 GOTO R
466 LET C / W - C H R * {CODE C/(x)-i; 950 P R I N T AT N-»-I,N-N/L;X
kid LET R = R * I -000 P R I N T AT I . M j " ( l * - . M f i r d E . 1 5 * m i f t e d ; : r J t . ; . i c 7.
I , .-.-.ifted i r . i p « i c R)-:rA. ... ^ r t . J ,;.-.,,„• •.. j ) - ; A / f V A L
*tf RETURN
H/(L»XJ»>;-M-L)i"fl * • f t txl / : r . « » i i i e fi)«:TAJ» N ; * ( l - Milt. I
5/0 LET H/-mC971' //" flrapf-.ic u . l i - i - h i r t i - d ^ r a o h l c < . 1 > . h i r e . * ! a r a o h l c oJ •
502 OOSUB T 10/2 P R I N T AT - . ' / L . Q . A / f V A L li/ ( L . 1) • J ) ; A/(VAL H / ( H - L > - l ) , , , A / (VAL 11/
50k FOR X = I TO VAL 00 ( H - 1 ) • ! ) ; A / ( VAL rt/(M).l)
50i OOSUB J 100k VIPUT 0/
508 NEXT X 1/0- IF LEfr 0/ VAL>'25i' THEN GOTO VAL "l/>2"
510 LET X = X - I 10/8 IF VAL H/(l}OS 7KEN G O T O VAL •llfi./m
512 LET H0-"077102c" 1010 CLS
SI* 00SL'B VAL '950' 1012 P R I N T AT L.M*I;A/(N-H)
516 LET E/ (X*I/ • CHH0 LEJ) 00 1/1- RETUWi
518 LET D / = D / ( TO E - I J * G / * D / ( F . I TO ) 1/2/ IF 0/ " TUMI GOTO T
520 RETURN 1/22 FOR 2 - 1 TO LEW G /
550 LET H/."C38l',//" 1/2- : F G/(Z)<~0- 1 H 0 / ( 2 J > - •• TUt-'J GOTO T
552 GOSUB T 102<, NEXT 2
35* FOR X-I TO VAL 0/ 1/26 :/• VAi ,:/ 'I;<VAL G / OF' VAI 0/ * THEN GOTI VAL
556 GOSv'S J 1/20 GCTO VAL -1^15"
558 NEXT X 1032 hh:::' A T .';-L,li:A/(f.'.H.I; IA/FVAI. H / ( L ; . N - M - L J i A T N . N ; A / ( N . M - L )
5C0 POP TO B l/'jk GOTO T
562 LET B > ( y j = E/(Y,O TO H)»3/(y, TO o-ij-B/(y.H^i TO ; Iki/ AVE F/
56* NEXT y 1^22 GOTO VAL "12/"
J66 LET CRF.MFIFURTED ^RACHIE 1) '.C/(XUC/(L TO X-1)~C/(X.I 70 J
563 LET D/ C/ 'E TO FJ.D/( TO E-I>*D>{F..I ^ J Note that underlined instructions indicate the number of blank
570 LET E / "(AHIFTTD CRAAHLC JJ • • E / ( X ) .£/ FL T O X - I ) - E / ( X * I T O > spaces or the graphic character symbol that should be entered in this
572 RETORH position.
*>00 LET SI/, - B j f 9 1 | » 3 5 "
t,02 OOSUB T The program should now be run, tested and taped out, before conti-
60* LET y VAL G / - C nuing to add the sort option which follows. Then press Break whilst
w FOR X . c * l TO y either the Option Page or the Report Page is being printed onto the
LET C/-C/*" (thifted 1)" screen (in Slow model in order to add the extra programming. Then
010 LET H/- "f r,i026' add the following.
(12 GOSLB
' VAL
6lk LET E/E/.C!£P/ LE:.- • ; / 81 STOP
616 LET D / = D / . G /
618 LET R - R - I Then RUN the program. The program will stop at line 81. Now
620 NEXT X delete lines 8 to 81 inclusive {this can be done by entering the line
622 LET c * r numbers followed by Newline). The program must not be RUN again
62k RETURN after this. Now add the following.
650 FOB X=I TO C
15* I'RIK: •OPTIONS" •• - , " •. .:. I: V. • <F;2-J • . • : :.JC«. )
652 OOSUB J S-SORT*
654 PRINT X;". ":A/(N/LJ, 178 I F 0/ •S• THEN OOSUB T - L
656 IF X=P THEM GO::!.! U K 2/0/ FAST
658 NEXT X 2/02 FOR P.I TO D
660 LET P . P - X 2/0k IF L-«R>D 00. VAL " it''
662 PRIST A/(K-*.L) 200-: NEXT P
661. FOB Y s l TO D 2008 LET « r L - * P - I
666 OOSUB VAL "7/0• 2010 LET W . I N T (V/Lj
668 IF Y-P THEN GOSUB K 2/12 IF M = Q THEfJ RETUR'J
670 PRINT r:*:*; 201k LET X-D-W
67 2 FOB X=I TO C 2/1. L E T Y--I
67k OOSUB VAL "716* 2/13 LET F = y
676 IF X . H . L E X S7P/ y>VAL " j 1 " i : i v GOTO VAL " -.* 202/ LET Z•P*V
e>78 PRINT B / f Y . O TO H) : M l 3»e<f]*: 2022 IF TKEV GOTO VAL
i-60 NEXT X 202k LET y.Y»I
68 2 PRINT B / ( y , 0 TO VAL " J l ' - X - L E M S T R £ y j AND X< C 2/2m IF M TJIEI; GOTO VAL " V - / "
68* NEXT y 2/28 GOTO V A L "2/18'
6 86 GOSUB K 203/ LET X/-I.Y(PJ
688 RETURN 2/32 LET B/(P)-B/(Z)
700 LET E»Q 20}* LET B0 (2) -- X/
702 LET P = « 20 J t LET F=P-W
70k LET 0 - 0 20} 6 I F PCT THEN GOTO VAL
701- LET H-Q 20k/ GOTO T - L - N
708 RETURN
710 LET ENCODE E/(XJ.E
712 LET FA CODE E/(X.I}«F Now enter as a direct command:
71k LET A/(H/L)=D/(ETOF)
716 LET 0 =CODE C/(X).G GOTO 1
718 LET H-CODE C/(X.L).H
720 RETURN then press Newline. The program should now work complete with
W IKPUT 00 the alphanumeric sort option. To start a new file, always Break, then
602 LIT P±P«N*L GOTO 1. If you have more than 16K of memory and wish to add
80- CLS more cards, then replace the 'X' in line 116 with a '0'.
983
ZX COMPUTING FEB, M A R C H 1 9 8 3 23 23
J
SPECTRUM CAME
Drainpipes is based on the old
style of mechanical arcade game
in which steel balls were drop- Here's an adaptation of
ped into cups or tubes.
The basis of the game is sim- an old arcade game
ple enough, A ball runs along a
stepped roofline at the top of the written for us by Colin
screen and will drop down if
you press 'D'. Below it are a
series of seven 'drainpipes' and
Cooch of Somerset.
you score by making it drop into
the centre of one of these. Each
drainpipe will only score once
routine by leaving out line 190 A Graphic
and lines 710 to 890. You can
and a red indicator will light up also omit line 15 and the in-
explanation
to show where a score has been structions.
made. A score in each pipe will Line 100 looks a little clum- To help you type the program in,
give a maximum of 28 points. sy, but it works! It could be done Colin has provided us with an
This version of the game has with a subroutine of print explanation of some of the lines.
a random 'flip' feature. A red statements. It can also be made
and white flag will sometimes il- straight. . . though whether this Line 100 includes seven
luminate as the ball is dropping makes for an easier or harder Graphics shifted 8s followed by
and at the same time, the rate of game is a matter of opinion. 31 spaces, then six Graphics
drop slows down. If you don't You can make things a tittle shifted 8s followed by 31
like where the ball is heading more difficult by reducing 'ra' in spaces.
press 'K' and it will slide off to line 190 thus getting less flips. Line 240 includes four Graphics
the left and make its way back You could also reduce the shifted 8s, one Graphics shifted
to the start without incremen- PAUSES in lines 730 and 800 to 5. one Graphics 8, one Graphics
ting the ball score. You can then increase the speed of each ball. 5, one Graphics shifted 8, one
try again. Alternatively, as it And if you really want to get Graphics shifted 5, and so on to
slides off to the left you can your fingers confused on the until the end of the line which
press 'D' again whereupon it will keyboard, why not write an ex- you should finish with a
once more go on its downward tra subroutine called by INKEY$ Graphics 5.
path. After 1 2 balls (or a max- "L" which will cause the ball to Line 360 includes one Graphics
imum score!) the computer will slide to the right. If you do this, shifted 8.
tell you your score and invite the subroutine would be called Line 840 includes three
you to play again. If you don't from line 740. Graphics shifted 8s.
want to continue, then pressing
'N' will get you a fond farewell. D R A I N P I P E S
variations on a
theme
Anyone who wishes can find a
FLIP
lot of variations that can be done
with this program. For a simple
game, you can omit the 'flip'
NOW A V A I L A B L E
r> \ O
FROM
ASP SOFTWARE
See page 114 for 5 REM D R A I N P I P E S
I P REM E-Y C . N . G O Q C H © I 9 B 2
further details I S CLS ; GO S U B 9 0 0
2<3 LET P S = 0 : LET p b = 12
16K Expandable RAM 1K. This smaller programme also analyses all the horses in a race
Uniquely expandable lo 32K by the addition of our 16K Expansion and will list the most likely winners On the first day ever trated it
Module. picked 8 winners from only 8 races (20 3 82) Full instructions
ZX P A N D A Basic 16K R A M Pack £25.00 incl included and a 14 day 50% money back guarantee if not fully
Z X P A N D A 16K Expansion M o d u l e £19.95 incl satisfied £8.00
G I A N T P A N D A Full32K R A M Pack £40.00 incl
Finally the Really big O n e M K R A M Pack £65.00 incl
FORTUNE TELLING
The predictions in this full 16K programme will amaze you and your
KEYBOARDS friends. Covers your future, day to day gambling etc etc A 14 day
TYPE A CASED 42 KEY 50% money back guarantee if not fully satisfied £5.00
£30.00lncl
TheZX81 fits inside
The tough ABS injection moulded plastic case measures 8" * 14"
x 2 V4 " and hooks up to your ZX printed circuit boar'd in minutes. No
technical know how or soldering is required.
Proctim
1 and 4. Next, you will be pro- processing of both film and
mpted to give a name, of up to paper where daylight containers
four letters, to step 1. Then, you are used. I suppose with the
will be asked for a time, from one right colour filter over the VDU it
minute to 10 minutes in 1 5 se- could also be used in true
cond blocks, for step 1. This se 'darkroom' situations.
quence of naming and timing
if you're still in the dark will continue until all steps are
done. When all are done you will
4
5
DIM ZI4)
DIM N$ (4,4)
Coupe shows you how. The screen will now clear and
the name of the first process and
the time that you have allocated
46
47
50
INPUT F$
CLS
GOSUB 900
to it will appear on the top line. A 100 PRINT "END"
vertical plot will also appear. 101 STOP
The object of this program is to cially produced timer that I know The vertical plot is propor- 500 FOR K = 1 TO A
enable me to use my ZX81 as a of! tional in size to the length of time 510 PRINT "NAME STEP" ;K
process timer in the photo- The program listing is fairly that the step will take. As 1 5 520 INPUT K$
graphic darkroom. Most straightforward and it involves second intervals go by, one pixel 530 LET N$(K) = K$
photographic processes involve no concepts beyond the scope at a time is nibbled away from 540 PRINT "TIME FOR";
a number of steps and all these of the average ZX81 program- the original vertical plot. The N$(K)
steps can have different times. mer. bottom pixel is left to show the 720 INPUT Z
Keeping track of which step in a start of the plot. When there are 730 LET Z(K) = Z
process you are in the middle of, RUNning the only two pixels left, at the top 740 NEXT K
and how long it should last, and bottom, you are into the last 750 RETURN
makes it difficult if not impossi
program 1 5 seconds for this particular 900 FOR P = 1 TO A
ble to do anything else at the The program splits, basically, in- step. At the end of the step the 910 PRINT N$(P);"FOR";
same time as processing work. to three major areas: screen clears, a new top line ap- Z(P);"MINS."
Obviously a device which keeps pears and a new plot appears. At 915 LET W = (ZIP) * 4)
track of these things for you — a. input sequence. the end of the sequence, the 920 FOR R = 0 TO W
and gives an instantly b. Timing sequence. word END appears. 930 PLOT 0,R
'checkable' graphic readout — c. Graphics display. The program runs happily in 940 NEXT R
is going to make working much my unexpanded ZX81. Ob- 950 FOR Q = 1 TO W
easier (and more foolproof!). At the start of the RUN, you will viously, with more memory, a 955 PAUSE 748
Timers are available commer- be presented with the word much more elegant program 960 UNPLOT 0,G
cially, but many of these units STEPS. Here you input a number could be produced using Proc- 980 NEXT Q
will cost almost the same as a which corresponds to the tim as its base. I have found the 985 CLS
newZX81 — and you can't play number of steps in the sequence program most useful in a 990 NEXT P
space invaders on any commer- that you wish to time, between number of applications in the 999 RETURN
983
ZX COMPUTING FEB/MARCH 1 9 8 3 27
MACHINE CODE
remaining
"PROGRAM", USR 16514,
"DISPLAY FILE", USR 16522,
"VARIABLES", USR 16531,
"WORK SPACE". USR 16540,
"STACKS", USR 16559,
"SYSTEM VARS", "125",,,
"SPARE", USR 16549
MEMORY ALLOCATION
PROGRAM 2943
DISPLAY FILE 793
VARIABLES 48
WORK SPACE 0
STACKS 18
SYTSTEM
VARIABLES 125
SPARE 4265
J
28 ZX COMPUTING FEBMARCH 1983
MACHINE CODE
1 REM (containing 61 of any RUN this program and input the number of figures have been in- time.
character) decimal values given in the put) will terminate with 0/7.
2 FOR I = 16514 TO machine code listing. Note any If found useful, the REM Any RAM to spare?
16574 mistakes made as these must statement and line 9999 which
3 INPUT A be 're-POKEd' before the end. calls the machine code can be If the user requires the spare
4 POKE I, A When the last value (2011 has SAVEd on tape and re-LOADed RAM option without the rest,
5 SCROLL been input, the program (if before inputting any program. the program in Table 1 will
6 PRINT PEEK I.I everything has been input cor- The 'SPARE' is very useful as it achieve this.
7 NEXT I rectly or at least the correct give the bytes remaining at any
On your spectrum
Phil Carratt takes a long,
hard look at some of the
software available for
the zx Spectrum.
and is used for movement.
Startrek 'Torpedo' uses the same direc- o<5
— Fuller Micro tion input, and will always
4
Systems destroy any Klingon it hits, 4 0
whereas 'Phasers' seem to need HIT
Fuller Micro Systems' Startrek is an awful lot of energy to knock
a no-frills version of the classic out the enemy. 'Update' is
game, for the 16K Spectrum. equivalent to a short range Cf>
Your task, as ever, is to clear the display, and has to be used if PN
eight by eight sector galaxy of 'KSS/J
you want the destroyed Klingon * go
the cursed Klingons. Nicely to disappear from the screen. 3 1 4
detailed user-defined graphics Updating is done automatically
13
are used to mark the Enterprise when the Enterprise moves. The
and any Klingons or starbases in 'Long Range Scan' shows Kl-
your current sector. You are also ingons, starbases and stars in The galaxy is well supplied
told the state of your energy the surrounding eight sectors with starbases at which you can
reserves, shields and torpedoes. and is slightly confusing as it is refuel, but I can't help feeling would have been nice to see the
Sectors are numbered con- not justified, so that if there are that with such a limited number torpedo tracks) and sound ef-
secutively, rather than in the only stars in a sector, it appears of commands and scenarious, fects.
more usual line/column format. in the Klingons column. 'Shields' you'd have to be a pretty
Seven commands are set the strength of your dedicated 'Trekkie' to see this 'Startrek' is priced at £5.50
available in this version. 'Helm' defences and the last command one through to the bitter end. and is available from Fuller Micro
requires a direction from 0 to 7 is 'Resign' for when you tire of However, it is reasonably quick, Systems, The ZX Centre,
and 'Warp Factor' from 1 to 63, the chase. has good graphics (although it Sweeting Street, Liverpool 2,
House names
Should you have a problem
searching for a house with
a name but no number, Mr
Graham of County Durham has
come up with a clever solution
This program, written for the error at this stage there is no Save and finish routines are
X Temporary map
ZX81 with 16K RAM Pack, need to worry as you can al- included in the listing. For a screen number.
following initial entry will start ways amend your entries later more detailed guide to the
M$ Map string.
immediately with a main menu. using option 4. listing, here is a table of the
This menu offers you seven op- N$ Name string.
House Names will search for variables used in the program. - Temporary test.
tions: a list of house names; a PS
a property using the first few let-
search for a house name; a T$ - Test string.
ters of the name and then B - Map screen number.
display of a street; the oppor- X$ - Input check.
display a map on the screen C - Map line number.
tunity to enter or amend a house Z$ - Input.
with a flashing cursor in inverse D - Flag check.
name; to start a new file; to video adjacent to the house in E - Loop counter.
save a file on tape; or to finish. question. On request, the com- F - Loop counter. The reason why so many
Ten maps of 20 lines can be puter will then search for G Flashing cursor line variables were used was to pro-
entered line by line and after 10 another property. Once you number. tect the screen maps. Should
lines have been entered you are have the correct display on H - Flashing cursor loop the program crash, try typing
asked if you would like to cor- screen, you can copy the screen counter. GOTO MENU and restart from
rect any errors. If you make an onto a printer. S - Save flag check. there.
34 ZX C O M P U T I N G FEB/MARCH 1983
T 4- L E T T E R S " , " P R E 5; NvL IJH GOTO 4030
EN R E A D Y . " 4090 CLS
20 2 0 INPUT T $ 4-100 I F THEN GOTO
£0 3 0 IF T $ = " " THEN GOTO MENU 4-130 P R I N T "ENTER T H E HflP REFERE
20 4 0 P R I N T T $ . " S E R R C i i l H C - NCE NUMBER IF NOT KNQUM PLERSE
20 5 0 PRUSE 5 0 ENTER ""0
20 6 0 POKE 164-37 , 2 S 5 4135 PRINT *' YOU SHOULD FIND THE
20 8 0 FOR E = 1 TO B NUMBER ON THE EXTREME L E F T OF
20 8 5 LET G=0 THE MRP S C R E E N - "
20 9 0 FOR K = 1 TO £ 0 4 1 3 6 P R I N T RT 2 1 . 0 ; " E N T E R NUMBER
21 0 0 I F ( 1 tO L t N »
THEN GOTO 2 3 0 0 4 140 INPUT X 9>
2105 LET G ~ G + 'l 4 150 IF X S < " 0 " OR x * 9 " U K •I'HL
2110 NEXT K X $ < > I N T URL X * OR U R L X £ -> 1 w T H E N
2120 NEXT E GOTO 4140
2130 CLS 4160 CLS
214-0 P R I N T HT 1 0 . 3 . " 4170 IF X$="0" THEN GO i O 3 0 0 0
35R" , .. . " DO OU {,'RMl TO ENTER RN 4190 LET X =URL X *
OTHER N R M E ' ? " , T R B 14, " Y / N " 4200 PRINT
2170 INPUT Z$ 4201 PRINT X$ .
2180 I F Zt<> "Y" THEN GOTO MENU 4 2 0 S FOR G = 1 TO 2 0 STEP . t-
2190 CLS 4£10 FOR F = G TO G+9
2200 GOTO S 0 O 0 4220 PRINT THD 3;F;TRB tt $ i.X , F )
2300 CLS ; N * I X . F)
2305 LET 0—1 4.235 N E X T
2310 GOSUB 3 0 1 0 4 2 3 0 GOSUB SS10
2400 PRINT "PRESS r»JH?S5 END 4 2 35 CLS
.. UK •' C l L'L«P/ 4 2 3 6 PRINT
4 2 4 0 NEXT G
240S SLOW 4 2 7 0 GOTO MENU
2410 FOR H — 1 T O 3 5 0 0 0 PRINT RT 9
2420 PRINT RT G.15,'Jtf:'
2430 NEXT H
2450 FOR H — 1 TO 3 5 0 1 O L E T L - O
2460 PRINT RT G,15j 5 0 2 0 P R I N T B ; " . " ; T A 8 3 : e ;
2470 NEXT H 5 0 5 0 SCROLL
2475 LET D=0 5 0 6 © P R I N T RT 2 i. . 0 . ENT .hi MH» - i C
2430 IF INKEY $ = " " THE:-) G O T O £ 3 1 0 CHARS j OR" " Z Z " "TO END"
£435 r Hi- T 5 0 7 0 I N P U T I B )
2490 IF I rtEN IsUl'O iild 5 0 3 0 I F M$(B.CJ » l l TO 1 H;
i N GOT U SSO S
11 2493 IP INKEY9= "C" THEN COPY 5 0 9 0 PR I N 1 HI I U , -Ji, L- ; ! M O t? . !»
2495 GOTO MENU CJ
3000 REM SSHBGHlEIaKgeaHSi 5 1 0 0 PRINT RT £ 1 " t N T C f i NAME -
3001 L E T C- = 0 16 L E T T E R S
3002 LET E =1 5 1 1 0 INPUT N$(6,C)
3010 PRINT ; E; " . " ; 5 1 2 0 PRINT RT 1 0 , 1 6 ; N » t B , C *
3020 FOR F = i TO £0 5 1 3 0 PRINT RT £ 1 , 0 ; ' *
3030 P R I N T T H i S S ; M S i £ ,» i ; M 5 t L , F >
3040 NEXT F 5140 IF D = 1 THEM R E T U R N
3050 IF D = 1 THEN RETURN 5150 LET N —N 1
3060 PRINT "ANOTHER MRP? Y / N " 5151 LET C=C+1
3070 INPUT Z$ 5152 LET J=1
3075 CLS 5160 IF C = 1 1 OR C=£l THEN GOSUB
3080 IF ZJ<>"Y" THEN GOTO MENU 5500
3090 L E T E =E 1 5170 IF C < >21 THEN GOTO 50t>0
3095 I F E >10 THEN L f T C=1 5190 L E T B =B + I
3100 GOTO 3010 5191 LET C =1
400© PRINT TRB B; 5200 IF B < >11 THEN GOTO 5050
mam- 3 2 2 0 ir-r
4010 PRINT 2 P Q 5 H 5 "
4020 PRINT " Y O U MRY U P D A T E R N EX 5230 PRINT TRB 6; "PRESS N.-'L T O C
I ST IMG MRP / OR fOU CRN HRUE R 0L ONTINUE"
flNK S C R E E N T O D R R U ft N E U M R P . " , 5240 INPUT S
TRB 5 ; "ONLY" 10 RRE RURILRBL2" 5245 LET M$<S,CJ="
4025 PRINT 5250 GOTO MENU
1030 P R I N T "YOU i;lLi_ BE GJLUCN TH 5500 REM
E CHRNCE TO RECTIFY Rt4Y ERRORS L 5505 LET X-B
RTER" 5510 MRINT NT £ 1 . 0 uO
4032 PRINT RRECT7 Y / N "
4033 PRINT "R SCREEN MRS O N L Y £0 5520 INPUT Z$
LINES. YOU MRY N t E D MORE »»1nN O 5530 IF Z * = " Y " THEN R E T U R N
NE SCREEN." 5S40 PRINT RT 1 , 0 ; "ENTER i'NCuftR
4035 PRINT "NOTE R NEW MRP START ECT L I N E NUMBER"
5 LINE 1" 5550 INPUT P$
4040 PRINT ' "DO YOU URMT TC- COMTX 5552 IF P $ < " 1 " OR P f > 9 " OR U f l L
Nut? r / N " P $ <>INT URL P S O R U R L P $ >£fc< T H E N
4050 INPUT Z$ GOTO 5550
4060 I F Z$<>"Y" THEN GOTO MENU 5555 LET P-URL. PS
4063 LET S-0 5560 LET U=P
1065 CLS
5565 IF U >10 THEN LET U- U -10
4070 PRINT R> 51 0 ; " N E W OR EXIST 5570 PRINT RT 2 1 , 0 ; " E N T E R MRP MH
ING-? N/E. X. 10 CHARACTERS -
4080 INPUT Z$ 55B0 INPUT M$<X,P)
4081 IF Z$< )"N" RND Z * < > " E " THEN 5585 PRINT RT U.6,M$<X,P>,
SEARCHINGUS
UANCOURT
U f t P O R INF.
UARENFORD
UATENDLATH
UERRHOLME
UELUYN
UERNETH
U E S T U I EL;
7O4 0 INPUT Z? UESTLANDS
7050 IP Z$ . > "7 T H E N GOTO M E N U UESTOE
7 0 6 0 CL 6 UILLOUBRAF
"'0S0 P R I N T RT 10,10; "EB FINISH B UTNGROUE
-
iftfci:
7090 GOTO 9999 C IT w
P R fc— 3 N, L i O C'jriT I N U E
i?000 REM
I F U < >I THEN GOTO MENU
6C)2S
SUN , ' L N D RD UIL5
THE
SCREEN W I L L BLANK OUT"; * * * * * * * * * * * * * * * * * * * * *
( Re. o , " n S O BE Udwr PRTIENT*" * H * I • THE POPLARS
3 0 2 6 PRINT ,,"GO AND MAKE R C U P * I *
G F T ER OR H A O E " : T A B 9 ; ' * R N ERRLY * G * ! < AYTONDALE
liATH" .TAB 7; KEV N s L U H E H R E A D Y " * H * FELLDALE
3023 INPUT Z% D * * 1 i EAGLESFIELD
H
•!
«030 LET G = 1 * *
6 0 1 0 F O R E = 1 TO B E * E * CAMILLA
U
I•
5 0 5 0 FOR F = 1 TO £0 * *
3 0 6 0 L E T P * G = N $ (£.. F N * O * GORSEUOOD
R
I•
306S I P R$ (6) (1) r ' f l " OR R * t G J V I ) * *
>"Z " THEN LET R $ ( G ) = " V E * T * BURN BRAE
H SCHOOL ENTRANCE
6 0 7© L E T
3 0 3 0 NEXT
G=G+1
F * * •
I TUDOR LODGE
•DC-30 N E X T
3 1 0 0 FOR
E
• 1 TO
J X i e i P UK L = K 4 l
G - l
TU N
*
*
*
L
N
R
*
*
* !I
•
I ALNESS
DENESIDE
E
• E NGDL E N D E" UI JO" N U R G N G
B ' 1 2 0 I F R $ C L ) > = R » (K> T H E N G O T O 8 * *
260 * *
S S
M .. p.
•3130 LET i_.«
ol40 LET R5(L)=R$(K) "C" TO COPY
3150 L E T R $ u*. .i - T * Above are some example screen displays from the program. The top
6160 NEXT L illustration shows the options available, then once you have entered
NEXT K the option you want you can list the house names or search for a
3130 LET J=0 specific name. The final example shows a street with the various
3190 GOTO MENU houses with their names PRINTed alongside.
9999 STOP
• your
the title page:
dreams
clues themselves. Their difficul-
ty ranges from moderately dif-
ficult to downright impossible,
but they are not all along the
same lines as is so often the
case with games.
Now for the one disappoint-
ment of the program there
are no graphics at all. Surely
they could have 'jazzed' up the
clues a little with some ani-
mated diagrams or moving
Our reviewer, James Walsh, looks at the pieces. That might sound a little
silly, but it would be nice and
latest offering from Artie Computing would certainly brighten up the
game. As it is the program has
and tries to win himself £10,000. been writien almost entirely in
BASIC, which seems rather
wasteful of space and time,
claimed the amount of money is though fortunately (as you will
increased on a weekly basis). soon find out) the time factor is
OK, it looks as though it has not so important!
almost LOADed. Hurrying to Actually playing the game is
gel my registration form so that quite fun, but I fail to see the
I can quickly claim my prize, I need to take the trouble to put
sit down waiting for the pro- on a cassette and load it all in
gram to begin. You are first and spend hours staring at a TV
greeted with a menu which of screen, when it could quite
fers you five options: how to easily have been written out on
register, rules and play, see a a few pieces of A4 paper and
sample clue, how to claim the sold for a tenth of the price-
prize and see the real clues. As for the game itself, it is
definitely good if you are into
All clued up? cryptic clues and mind-bending
puzzles, but I would not say it
The rules program is good. was for the majority of games
There is a nice sequence of players. Needless to say, I have
graphics to start — a key not filled in my registration form
moves across the screen and yet!
turns in a lock. After reading
KRAKIT is a new program from the rules, I pressed for option 3 KRAKIT is priced at C9.95 and
Artie Computing which claims and had a glance at the sample is available from Artie Com-
to be the ultimate adventure for clue. After the solution has puting Ltd, 396 James Reckill
the Spectrum/ZX81 with the been explained to you, you are Avenue, Hull, North Humber-
added bonus of a generous ready (?) to start on the real side HU8 OJA.
prize if you should be the first to his will, but (and it is a big but)
'KRAKIT'. Retailing at C9.95 in to claim the money, you must
this country, it certainly isn't first solve 1 2 clues before you
cheap — but is it worth the can gain access to the bank ac-
cash? There is only one way to count in which the money has
find out - cassette in, LOAD been placed. The prize money
"RULES", press Play, sit back actually exists and just to make
and wait. things completely fair, Artie
Because of the complexity Computing have released the
of the program, the rules and program simultaneously in
clues have been split up into America to run on the Timex
two separate programs on the 1000. Artie are quite definitely
16K ZX81 and ZX Spectrum. going all the way to make it
So. while we are waiting for the successful and fun not only
program to LOAD, I'll tell you has there been a lot of press on
something about the package the package, but Artie have set
itself. up a 24 hour telephone answer
line so that contestants can
The story so far... keep themselves informed
about the status of the contest
....... - - . -
The story is that your eccentric and the amount of prize money
father has left you £10,000 in now available (if the prize is not
J
ZX COMPUTING FEB M A R C H 1 9 8 3 37
SOFTWARE REVIEW
your
Puzzled by Dr. Nowotnik, after
a glass of wine Nick Pearce
settles down to'checking out
some of the software
commercially available for your
ZX81.
The Nowotnik fie, giving sixteen smaller If you complete the puzzle, shed, later. I would have liked
squares; at the hardest level, you are told the number of an option to reduce the number
puzzle and the four squares are each divid- moves taken, and there is a of shuffles so that some logical
Other Diversions ed into 1 44 elements, giving a game save facility so that a method of solution could be
— Phipps total of 576 elements alto- partly completed puzzle can be developed by trial and error dur-
gether! continued, and hopefully fini- ing the first few tries; the sight
Associates of a well-shufled puzzle on the
first attempt is itself rather
If you're bored with that drat-
daunting.
ted Rubik cube, then the
Nowotnik puzzle is an original The person who has
concept in computer games mastered the magic cube will
that might be just the thing for have a head start in tackling the
you. The chances are you'll be Nowotnik puzzle. Conceptual-
tearing out your hair in hand- ly, the problem is similar; it is
fulls trying to solve the puzzle relatively easy to complete one
at the simplest level of play, square, or face, but it is solving
knowing that there are four pro- the whole puzzle without ruin-
gressively harder levels to ing those squares, or faces,
move onto if you ever do already completed that is so in-
manage to get it worked out. furiatingly difficult.
"Easy — it's only two dimen-
sional", I hear you say, as I
myself commented — until,
that is, I had seen the pieces
shuffled and attempted a few
exploratory moves. It is indeed
a puzzle of merely two dimen-
sions, but don't be under the
misapprehension that it is,
therefore, a doddle.
At the beginning, and when
(and if!) completed, the puzzle
is in the form of four large
squares. These squares are
shuffled by the computer using
a random selection of eight
possible movements. The pro-
blem is then to use these eight
movements to get back the
four squares in their original
layout. At the simplest level,
each of the four large squares is
broken up into four by the shuf-
38 Z X C O M P U T I N G FEB/MhT^
5
A very addictive game, and Finally, Tenpin simulates a
as is so often the case with this standard game of tenpin bowl
kind of competition of self ver- ing. The alley is displayed at the
sus the computer, it is very top of the screen, with score
hard to admit defeat and one cards for either one or two
tends to persist, thinking that a players displayed below. The
few more moves will have it game is played over ten frames.
cracked. Perhaps it is fortunate When bowling, you indicate the
that the ZX81 is less portable strength of delivery; a stronger
than the cube, otherwise it delivery is less accurate but in-
would undoubtedly make its creases the number of pins
appearance at parties with the which fall if you make a hit. Not
nonchalant admission, by being a tenpin bowling affici-
devotees, of the number of onado, I was intrigued by the
moves or time taken to solve scoring which apparently is true
the puzzle. to life and is coupled with Computerwine Instructions come in a 22
'strikes' and 'spares'. The page manual, which is well
A dynamic duo graphics are fair; the ball dis- — computerwine written and extremely helpful
appears when it hits the pins If you make your own fruit — a pleasant change, I feel; so
Two other games, routine in and the effect as the pins fall wines, you might find this often, otherwise good com-
comparison to the puzzle but and also disappear is rather dis- package of interest. It is aimed puter software is let down by
nonetheless absorbing, com- concerting. Nonetheless, a primarily at the more experi- the poor quality of the suppor-
plete this cassette and make it novel simulation to complete enced winemaker, and is a tool ting documentation. As well as
good value for money. the package. to enable precisely balanced describing the background to
In Demolition, a wall appears All the games on this wine recipes to be designed the experimental work,
at the bottom of the screen and cassette require a ZX81 with quickly and accurately. For the together with the theory behind
the object is to knock down as more than 1K, and each pro- amateur, it shows that there a 'balanced' wine and giving a
many bricks as possible using a gram is duplicated on the can be more to making wine comprehensive explanation of
' * ' fired repeatedly at the reverse side. The programs can than religiously following recipe the program, it also gives some
wall. There is a catch — the all be LISTed, and instructions books — perhaps leading to the useful practical hints on suc-
wall moves upwards at a slight- for making security copies are development of winemaking cessful LOADing and the merits
ly faster rate than you can given. Dr. David Nowotnik, the skills. of various cassette recorders
knock bricks out. and also more author of the three programs, is The package is based on the and makes of cassette. It gives
walls appear; eventually the a member of the Aylesbury results of recent and apparently a lot of useful information of a
game ends when a wall reaches Computer Club. extensive research which has more general nature to help the
the top of the screen. Points are led to the discovery of some of winemaker, although probably
awarded for each brick remov- the scientific principles which not sufficient to instruct a com-
'The Nowotnik puzzle and
ed, and the total for the game is Other Diversions' costs C5.00 govern the balance of wines. It plete beginner in the art of
displayed so that a competition and is available from Phipps is now possible to select winemaking.
between a number of players Associates, Mail Order Dept.. through these principles the in- Five separate programs are
can be held. A fast moving in- 99 East Street, Epsom, Surrey. gredients of the must to give a recorded on the cassette, and
teractive game and completely wine of the required acidity, each is duplicated on the
idiot proof — my four year old body and alcohol content. reverse side. Firstly, there is the
daughter played for about an Flavour is not scientifically Preface; this takes three
hour without managing to crash defined but is left up to the minutes to LOAD and runs
the program! winemaker through the choice automatically, starting with
of a large selection/combination some nice graphics. It then
of fruits — although hints for displays a summary of a few of
achieving a wine of good the more important points
flavour are given. The computer given in the manual. A nice
programs cover the design of touch (although I feel it is
balanced wine recipes for dry largely unnecessary) is that the
and medium wines (Computa- manual itself is sufficiently
wine intend to make programs comprehensive and gives full
available for sweet and dessert instructions as well as ex-
wines soon). amples.
*
T H O U S A N D S OF *
RESEARCH-BASED *
R E C I P E S FOR *
B A L A N C E D DRY A N D »
MEDIUM UINES. *
UITH CONTROLLED:
*
PH
*
*
BODY *
*
TOTAL ACIDITY *
'Computawine' costs
£7.95, and is available only
from Computawine, 9 Labur-
num Way, Etwa/IDerby.
40 Z X C O M P U T I N G FEB M A R C H 1983
SOFTWARE REVIEW!
and there are air-to-air and All these three Microgen make it a treat to play. It is writ-
ground based missiles to con- Another brick... games require more than 1K ten in machine code, and the
tend with as well. Points are and are written in machine speed (choice of fast, medium
awarded for each alien and air- Finally, from Microgen. Break- code. They are 'locked', ie the and slow), and the bat size
to-air or ground missile you hit. out is the traditional 'ping pong' programs cannot be LISTed (large or small) can be varied
Your fleet is small — three video game. Again you have a and, for example, modified by using POKE commands. Al-
ships — and only one is in the choice of three speeds (normal, the user. They perform well, are though written in 1K, this game
air at a time, although you can fast and superfast) and three enjoyable, and are idiot and can also be played on a ZX81
get a bonus ship if your score lives per game. You score ten crash proof. However, with on- with 1 6K RAM pack (by POKfc-
reaches five thousand points. points for each brick removed ly one game on each cassette, ing RAMTOP before LOADing
Fortunately, you carry an from the wall, and after each they are in my opinion rather the program — full instructions
unlimited supply of ammunition hit, the speed of the ball in- overpriced. There is only one are given).
plus one 'smart' bomb in each creases slightly. There are recording on each cassette, Nothing as straightforward
ship which will destroy every- seven angles of rebound off the although the review copies all as the usual Breakout wall of
thing in sight. The nearer you bat, and one life is lost each LOADed first time. bricks on this one either. The
get to the enemy base, the time the ball misses the bat. wall is built up of pound signs
more frenetic become the alien You win one thousand points 'Space Invaders', 'Scram which convert to dollars when
attacks on your ship. for completely clearing the wall ble' and 'Breakout' cost €3.95 hit. Ten balls are available and a
Again, joysticks can be used (not much chance of that with each and are available from maximum score of $240 can
and would be a definite advan- yours truly at the controls, but Microgen, 24 Agar Crescent, be achieved (but not by me!).
tage with this game. It is par- with practice and at the Bracknell, Berkshire. The instructions state that bat
ticularly difficult with the touch slowest speed, who knows...), movement is effected by using
and a record of the highest
sensitive keyboard of the 2X81
score is kept. A well-written
Gamestape 6, the cursor keys 5 to 8; on the
review copy, however, any key
to both maintain and achieve
forward and up and down and enjoyable version on this Breakout in the top row from 1 to 5
movement as well as battling not terribly inspiring theme. — J. K. Creye moved the bat to the left, keys
with the aliens. As with Space from 8 to 0 moving it right.
Invaders, the most recent game J. K. Greye are well-known for An excellent version of
score and 'highest so far' score good quality software for the Breakout, and good value for
are displayed to facilitate com- ZX81, and this fast 1K game is money. That it runs on an unex-
petitions. no exception. panded IK ZX81 is a commen-
The three bat angles in this dable achievement.
version, with full screen display
and the fast smooth action. 'Breakout' costs €1.95 and
is available by mail order from
J. K. Greye, Dept. SU., 16
Brendon Close, Oldland Com-
mon, Bristol, or from branches
of W.H. Smith and other stores.
HAVEN HARDWARE
ZX PRODUCTS & JUPITER ACE
SAE for details. 4 Asby Road, Asby, Workington, Cumbria CA14 4RR.
Prices include VAT and P & P.
Some of the products are also available from the following agents:
THE BUFFER SHOP, 374A STREATHAM HIGH ROAD, LONDON SW16
MICROWARE, 5 ST PETER'S LANE, LEICESTER.
PHILLIP COPLEY HI-FI, 7 CLIFFARD COURT, OSSETT, WEST YORKSHIRE.
TRADE ENQUIRIES WELCOME
Z X 8 0 & Z X 8 1 HARDWARE
Repeating Key Module KIT £3.95 BUILT £5.95
(As reviewed by Popular Computing Weekly)
Inverse Video Module KIT £2.95 BUILT £4.50
(As reviewed by Popular Computing Weekly)
Keyboard Beeper Module KIT £6.95 BUILT £8.50
Keyboard Entry Module KIT £2.95 BUILT £4.95
Input/Output Port KIT £10.95 BUILT £14.95
(Can be used with 1 6K RAM and printer without motherboard)
Programmable Character Generator KIT £17.95 BUILT £24.95
3K Memory Expansion BUILT for only £ 1 2.00
The most reliable memory expansion available.
Full-Size Keyboard with Repeat Key —The first of its kind
Built version plugs in. KIT £19.95 BUILT £24.95
ZX Edge Connector 23-Way Long gold plated pins £2.95
ZX Spectrum version £3.50
ZX SPECTRUM SOFTWARE CASSETTES
Fruit Machine Colour graphic representations of fruits. Including HOLD and
GAMBLE. £4.95
Solitaire Alpha-Numeric move entry. £4.95
Patience The popular card game (cheat proof). £5.95
Mancala The Chinese Logic Game. £5.95
REPULSER Repel the alien invasion. £4.95
WE ALSO STOCK A LARGE RANGE OF RESISTORS, CAPACITORS, ETC
983
Z X C O M P U T I N GF E B ,M A R C H1983 42
What's in
give them (our competitors) some fairly cryptic comments
three or four months lead to make. When asked if the
time. We expect the price of any of their products
store for
Microdrives to improve the would be coming down due to
sales of the Spectrum, but I the introduction of products
would expect the Spectrum to such as the Oric, he replied "If
sell on its own anyway." Mr they knew what Sinclair were
Searle went to explain that the going to do, they might well
Microdrives will be using "a have cut their prices." And on
totally new material for the Binatone, Nigel Searle really
recording medium. It's not set the cat among the pigeons
been used before in with these comments — "I
computers." think we will worry about that
Talking about Sinclair (the Binatone computer) when
Research's sales abroad, Mr they release the machine. If
Searle had this to say about we really believed the rumours
their growth in the Japanese we've heard, we would have
computer market. "We've not released the ZX83 two
made anything like the impact months ago."
on the Japanese market we Nigel Searle shouldn't have
would have hoped, but we will been surprised at the
be tackling it. The realistic avalanche of questions
alternative is to do it on one's resulting from his throwaway
At a recent press conference, released in the first quarter of own. It's a difficult job to do, comment. Hedging a little on
Nigel Searle of Sinclair 1983. As to why there was a but it's a challenge. If we took the 'ZX83', Nigel Searle had
Research was asked many of delay in their introduction, that approach, we would open this to say, "We are going to
the questions which have journalists were told that the an office in Japan, but as a try to produce a machine
been on everyone's lips over design of the Microdrive was matter of choice we would not which is quite different from
the last lew months. altered at a late date to manufacture in Japan." any other on the market. We
The Microdrives were, of incorporate some Moving onto the subject of want to create a new segment
course, one of the first topics improvements. Mr Searle the competition, which seems of the market — it's not a
to be brought up. Mr Searle explained why no details had to have made itself more matter of moving up or down
announced that he expected been given on the Microdrive, obvious over the last few the personal computer
to see the Microdrives "There is just no reason to months, Nigel Searle had market."
Better read...
prizes, "We are delighted to carry out acts of sabotage, it
make these three additional deals with the tensions of
awards in the Prize's inaugural actual events and the complex
year, because the authors moral dilemmas they provoke.
Hilda Bernstein, the South prize worth £2,000 and two responded so well to our The National Book League
African womens' and black third prizes worth £500 each. purpose of encouraging new are now taking entries for the
rights' campaigner, has won Announcing the awards at an writing on critical issues. In 1983 award. If you fancy
the first annual £5,000 evening reception in London, particular, Hilda Bernstein's trying your hand at writing a
Sinclair Prize for Fiction for her Clive Sinclair also presented winning novel completely novel for the Sinclair Prize for
novel, De3th is Part of the the second prize to Gill fulfilled the Prize's criteria for Fiction, write for further
Process. Edmonds for her novel. The high literary merit combined details from Barbara Buckley,
Due to the very high quality Common, and third prizes to with contemporary social and National Book League, Book
of the entries, the sponsors Aviot John for Chasing political relevance." House, 45 East Hill,
agreed, at the judges' Cursors and to Philip Latham To be published in the New Wandsworth, London SW18
recommendation, to provide for Sara Singing. The judges Year by Sinclair Browne, Hilda 2QZ. |
for this year only, a second for the Sinclair Prize for Fiction Bernstein's novel. Death is
Spectrum
for the
i
!
disabled
As a result of close
collaboration between Possum
the keys recessed and spread
out to facilitate operation.
Controls and Sinclair Research, There are also speed, delay
the ZX Spectrum is now and tone controls which can
available in a form which is be adjusted to suit individual
easily operated by physically operation requirements.
disabled people. As well as the regular
The Possum ZX Spectrum Sinclair manuals, there is a
comes in three versions: the Possum computer handbook
i Desk-top Scanning device, for which details the setting-up
constant use in the office or and operation of the Possum
school; the Brief-case machines. All systems are
Scanning model, a cased available with 48K RAM.
version allowing accessories to Possum Controls will also be
be carried in the lid; and the making recommended
Expanded Keyboard model, for educational software available.
people with gross movement The Expanded keyboard
or tremor. model can also be used in
The scanning models are conjunction with the 1 6K
operated by using any Possum ZX81 and, as with the other
input to scan the light around Possum products, the devices
the front panel which is a are compatible with the
complete replica of the Sinclair range of accessories.
Spectrum keyboard. In The price of the units is
I addition, an eight-way method very much dependent on the
of selection can be employed input devices used with the
using a joystick or footskate to machines and for further
provide faster selection. details, you should get in
The Expanded keyboard touch with Possum Controls
version is an enlarged Ltd, Middlegreen Road,
keyboard replica of the Langley, Berkshire SL3 6DF or
Spectrum keyboard and has 'phone 0753 79234.
• r\ , • •*<
m
Two new products are Software is the key to the 1
available to enhance the
operation of the Sinclair range
instrument's flexibility. By
measuring voltage and current,
L * • .
of computers.
The (list is ;he
the program can multiply
these quantities and obtain the v • . "
Measurement Module, which power value in Watts. In . i •
is designed to operate with a addition, by integrating over a *- 11
ZX81, offering science period of time, the instrument
St
teachers access to a versatile, can act as a digital Joule
data gathering system with a meter. Data can be gathered
wide variety of measurement, and displayed in large digits
data processing and display for all the class to see or in
options. columns of data taken at
The Measurement Module regular intervals, or
comes complete with a variety automatically plotted on a
of programs which operate the graph as the experiment
Module and select the continues. But perhaps the
appropriate physical variable to unit's greatest strength lies in
be measured (eg voltage, its ability to measure two
current, magnetic field or variables simultaneously and
temperature!. Although there then plot one variable against
That's handy
are no switches on the the other, thus enabling a
Measurement Module, it is a large number of relationships
multi-range, multi channel between physical quantities to
instrument. All range and be rapidly investigated.
channel selections are Whilst the Module is
performed by the program. All primarily aimed at physicists, it Midwich Computer Company range of computers. Also, as
the Module's functions are will also accept inputs from a Ltd have announced high the ZX81 and Spectrum do
controlled via single key variety of standard biological quality analogue joysticks for not have an A D converter
strokes from a main menu: no probes found in educational the ZX81 and Spectrum. built in, Midwich have also
knowledge of programming or establishments. The joysticks are made of designed a low cost, high
electronics are needed to The second unit available is injection moulded plastic and speed, four channel joystick
operate the instrument. the Interface Module which is are designed to sit controller board. This plugs
In addition, the instrument designed to enable a Spectrum comfortably in the hand. into the expansion slot of the
offers outstanding protection or ZX81 to be used to control Incorporated into the joysticks relevant machine, and
to the user's computer against robotic arms, solenoids, are potentiometers which are incorporates an edge
the inadvertent application of hydraulic and pneumatic claimed to have a life connector so that other
high voltage lall digital inputs valves, and stepper motors, expeciancy in excess of peripherals can also be added.
outputs to the computer pass etc. 200,000 operations (just The joysticks are available
through optical isolators, The Interface Module think how many alien invaders at £1 5 98 per pair from
giving up to 1 5KV overload contains four (optionally six) you could kill in that time!!. Midwich Computer Company
protection!. The inputs to the relays capable of switching 5A A push button is built into Ltd, Rickinghall House,
Module itself are also capable each and a stepper motor the handle which can be Hinderclay Road, Rickinghall,
of withstanding a very high driver IC. In addition, it has a operated, for example, as a Suffolk IP22 1 HH. Telephone
overload thus making it built in traffic light sequence 'fire' button. Each joystick or enquiries can be made on
1, suitable for use by the and all inputs to the computer pair of joysticks are fitted with 0379 898751.
students themselves. pass through opto-isolators so DIN plugs to suit the Sinclair
Sinclair software
Sinclair Research have names, addresses, etc. A
announced a further collection Reversi game is also available
of software cassettes to for the 1 6K Spectrum.
complement their existing For the ZX81, Sinclair have
range of business, educational made available 1 0 new
and games packages. software cassettes. For the
Priced from £2.95 to 16K ZX81, there are versions
£14.95, there are 18 of the adventure games Planet
cassettes available in the new of Death, Inca Curse, Ship of
range and have been specially Doom and Espionage, as well
written by Melbourne House, as Reversi, and two cassettes
Games of Skill, Artie, Psion with Thro' the Wall and
and ICL. Scramble, and Super Glooper
There are four adventures and Frogs. For the 1K ZX81,
for the 48K Spectrum there are two packages: one
including Planet of Death, Inca providing a game of chess and
Curse, Ship of Doom and the other, a collection of 11
Espionage Island I Planet of games such as Slot Machines,
Death will also run on the 16K Slalom, Space Pirate and
Spectrum). Two other Maze.
cassettes for the 48K A useful ZX81 Toolkit has
Spectrum are Collector's Pack, also been announced for the
which allows you to keep up 1 6K ZX81 providing nine
to 1,500 records of stamps, functions: RENUMBER,
LPs, etc; and Club Record DELETE, MEM, DUMP, FIND,
Controller, which enables REPLACE, SAVE and APPEND
clubs to hold records of up to and REMKILL.
300 members including their
May
piece de resistance, The Thorin, Gollum, and many
Hobbit. Based on the fantasy others, and best of all, they The people up at Work Force
land created by JRR Tolkein, not only interact with you but must have been busy of late
the player takes on the role of act independently as well Due judging by the huge selection
the
Bilbo, the hobbit. This to this feature, each time you of software they have
adventure program is take part in the adventure, dreamed up for the Spectrum
presented in words and full events will proceed in a and ZX81.
colour graphics and is slightly different way, and the Looking first to the
force
designed to run on the 48K further you get into the land of Spectrum software, they have
Spectrum. Tolkein's Hobbit, the more devised a package called
Perhaps the most unique different it will get. Programmer's Dream which
provides the user with a
be
factor of this program is that Written by Melbourne
the user instructs the House, The Hobbit comes number of extra features such
computer in completely complete with a copy of as RENUMBER, BLOCK
ordinary English sentences. To!kem's book and MOVE, BLOCK ERASE, LINE
with
The Hobbit program is capable instructions to play. Priced at ERASE, SEARCH and
of very sophisticated £14.95, for information on REPLACE. DUMP VARIABLE/
communications using this or any of the rest of the STRING, as well as commands
adjectives, adverbs and Sinclair range of software, to make a quick check on the
you
multiple sentences which the contact Sinclair Research Ltd, program and variable size. The
Spectrum understands. In all, 6 King's Parade, Cambridge features are called from just
the program has a built-in CB2 1 SN or phone 0223 one line of BASIC and operate
library of 500 words. 353204. instantly. The Programmer's
You get to meet all of the Dream is priced at £7.00.
Z X C O M P U T I N G FEB M A R C H 1983
SOFTWARE NEWS
Seriously.
Other software for the which is to create adventure
Spectrum includes a games (and if that sounds
Disassembler in 1.500 bytes; confusing, a mini adventure.
Di Loader, a machine code Treasure Mountain, is included
loader to use with a to show you how it's done).
disassembler; and Renumber These two packages are
Delete, a fast machine code priced at £6.95 and f 5.95 Notation; and Statistics, which
A series of programs have
loader which allows the user respectively Other programs covers t-statistics. chi squared
been announced by Asher
to define where to renumber for the 16K ZX81 include lor equal and unequal
Kuehn which will turn your
from, what the new start Address, which allows the expected values and 2 x K
ZX81 into a very clever
should be and specify the user to set up files of contingency tables.
business machine.
increment. The Disassembler. addresses on tape; ZX80 Among those available are And if these programs
Di Loader and Renumber Convert, which will allow you Matrix Planner, a matrix based seem a little too serious for
Delete are priced at £5.50, to run ZX80 programs on your modelling and planning you, there are three programs
£7.00 and £5.00 ZX81; and Greatest Games 1, 'spreadsheet' program; which tackle the lighter side of
respectively. a package which contains 10 Wordprocessor, which allows computing. The first. Truth, is
And if you've got a 1 6K games such as Pac Maze, you to process text in capitals a program which enables your
ZX81, Work Force haven't Gobler. Slar Defender, or upper and lower case ZX81 to enunciate an endless
forgotten you. Among the Vampires, Minefield and characters on screen or succession of remarks about
programs available are others. These last three titles printer; Commodity Trader, a computing and life in the
Adventure in Time, an are priced at £4 95, £4,95 program to help you keep a world of the computer. Using
extravaganza based in and £5.00 respectively. record of your trades on the a sophisticated linguistic
Australia where you have to For more information on all commodity market with your model to generate English
use your time machine to these titles and the rest of the broker; Forecasi, which sentences at random, most of
travel forwards and backwards Work Force range of software, provides the user with market its comments are amusing, all
in time to save mankind from contact Work Force, 140 forecasts, price fluctuations are different.
nuclear destruction; and Wilsden Avenue, Luton, and practical statistics; and The other two programs
A.D.V.E.N.T., an eight part Bedfordshire or phone 0582 three practical modelling available are Adventure and
program, the function of 454456. programs based on the Matrix Death, a trip through a
Planner: DCF Planner, Cash medieval castle inhabited by
Flow Planner and Profit
Poster problems?
monsters, ghosts and
Planner. treasure; and Scout 1, which
Alongside these programs, puts you in the cockpit of your
Asher Kuehn have also own spacecraft, escaping from
announced a set of the alien hordes.
mathematical and statistical All of these programs are
programs such as priced between £5 and £10
Mathroutines and Fit. which and are available via mail
can solve mathematical, order. For more information on
technical and scientific how to obtain these cassettes,
problems; RPN Calculator, get in touch with Asher
which simulates the operation Kuehn, a division of Karmead
of a technical calculator Ltd, 60 St Leonard's Gardens,
utilising Reverse Polish Heston, Middlesex.
Soft options
A new range of software is amount of memory.
now available from Video Also available are a number
Software covering the fields of of games cassettes including
business, education and Football-League, Test-Match,
recreation Stock Market and Party-Tricks.
Written for the 1 6K ZX81, Every program is recorded
the range includes Video twice and with the exception
Sketch, a program exploiting of Video-Index and Party
the full graphics capabilities of Tricks, an audio commentary
the ZX81; Video Map, a game describing the operation of the
in which you have to navigate program is also included. All
your 'plane to its target the more 'serious' programs
without being shot down; are accompanied by a
In our recent publication. 3 REM followed by 240 zeros Video-View, which allows the comprehensive operating
Poster Programs The Valley linstead of 239) user to create a miniature manual.
of Adventure, some readers 4 REM followed by 98 zeros view-data system; Video- A similar range of programs
are experiencing difficulty with (instead of 103) Graph, a planning and design will soon be available for the
the machine code listing that In addition change line 3040 aid; Video Index, a ZX Spectrum.
more experienced users would to read 3040 LET F = USR sophisticated indexing system All of these programs can
not come accross. 16985. allowing up to 1,000 be ordered by mail order and
Tc make the machine code To make testing Figure 5 references; Video Plan, an are priced between £3.95 and
easier to RUN and test (and hex dump easier, enter PRINT electronic planning chart or £9.95. For more information
harder to crash!), our author, USR 1 6985. S$ is an empty 'spreadsheet'; and Video Ad, you could write to Video
Ray Elder, suggests you make string. 32 bytes long ie. 32 providing an active information Software Ltd, Stone Lane,
the following changes: spaces. It is used to clear a display. Video-View. Video- Kinver, Stourbridge, West
line. All the machine code and Graph and Video-Ad can also Midlands DY7 6EQ or 'phone
2 REM followed by 41 zeros BASIC listings work as be used on the ZX80 should them on 038-483 2462.
(instead of 42) published. you possess the necessary
zx Exchange
Dear ZX Computing, Club was formed in October
ZX Exchange offers 1981 out of the mutual
opportunities for people to interest of owners of Sinclair
make informal postal contact ZX80 and ZX81 computers.
with ZX users in the UK and Founded by John Palmer and
abroad. This is especially myself, the membership has
relevant to those who live in expanded rapidly and currently
rural areas or who have no stands ai over 70. Natura'V,
local user group. the scope of the club now
Full details and a copy of encompasses the ZX
the current ZX Broadsheet are Spectrum.
obtainable by sending a The club provides a chance
stamped addressed envelope to meet other ZX owners
and an additional lOp stamp socially and to exchange ideas
to me at the address below. and experiences. To this end,
Yours faithfully, various club activities are run.
Meetings are held every
Nick Godwin, second and fourth Wednesday
4 Hurkur Crescent, of each month in the
Eyemouth, Claremont Hotel, Claremont
Berwickshire TD14 5AP. Crescent, Edinburgh, from
about 7.30 to 10.30pm,
Edinburgh ZX At these meetings,
members can bring their
Computer Club computers along, meet other
members and help solve each
Dear ZX Computing, other's problems. There are
The Edinburgh ZX Computer also tutorial groups so that the
983
ZX C O M P U T I N G FEB, MARCH 1983 48
I CLUB NEWS
more experienced members Gabriel tndalecio Cano alternate Wednesdays at 7pm. South East London
can pass their knowledge on. Sardana, For further information get in Microcomputer Club —
Currently, tutorials are being No 4 atico 2a, touch with Bazyle Butcher on Meetings are held at Thames
held on beginner's BASIC, Sun Andres de la Barca, 01 950 7068. Polytechnic, Woolwich, every
advanced BASIC, beginner's Barcelona. other Wednesday at 7pm.
machine code, and advanced Spain. North London Hobby Further details are available
machine code. Computer Club Meetings from Peter Philips on 01 853
We also publish a aro held at the Polytechnic of 5829
bimonthly newsletter which North London, Holloway Road,
every Monday, Tuesday, West London Personal
carries news of the club's
Wednesday and Thursday Computer Club Meetings
activities and articles and
during term time. For further are held at the Fox and Goose,
programs written by some of
information phone 01 607 Hanger Lane, on the first
our members. Another feature
2789 ext. 2161. Tuesday of each month at
of the club are the occasional
7.45pm. For more information
'workshops' we hold on
East London Amateur contact either Graham Brian
Saturdays.
Computer Club Meetings on 01 99 7 8986 or Neil Cryer
Membership rates arc £5
are held at the Harrow Green on 01 997 9437
per annum, or C3 for children,
Library, Cathall Road, on the
students, OAPs and the Worcester Park Computer Club
second and fourth Tuesday of
unemployed. Meetings are held in the
each month at 7pm. For
For more information Windsor Road Library on the
further details contact Fred
contact John Palmer, first Monday of each month at
Chairman of the club, at 56 The Association of Linger on 01 554 3288.
7.30pm. Further details of 1he
Meadowtield Drive, Edinburgh London computer North Kent Amateur Computer club may be obtained from the
{Tel: 031 661 31831 or
myself at the address below.
Clubs Club Meetings are usually library on 01 337 1609.
held at Charles Darwin School, Other Clubs include: Post
Yours faithfully. Biggin Hill, on the first
Dear ZX Computing, Office Headquarters (BT h
Keith Mitchell. The Association of London Thursday of the month. For POI. 1CPUGISEK Metropolitan
Club Secretary, Computer Club (ALCC) was lurther information contact Police. Home Office, ITN.
19 Meadowplace Road, formed in 1 980 as a result of Barry Biddies on Biggin Hill Guildhall and BASUG. Clubs in
Edinburgh EH 12 7UJ. the First London Computer 71 742. the following areas are also
Tel: 031 334 8483. Fair when the North London being organised: Wandsworth,
Richmond Computer Club
Hobby Computer Club Sutton, the Isle of Dogs and
Meetings are held at the
{NLHCCl invited other clubs to Westminster.
Richmond Community Centre,
loin them in organising this Yours faithfully.
Swindon users' Sheen Road, on the second
event. Monday of each month at
Club The Association was 8pm For further information
Robin Bradbeer,
Polytechnic of North London.
formed to provide a forum for get in touch with Robert London N7.
Dear ZX Computing, the Computer Clubs in and Forster on 01 892 1873.
A users' club has been formed around London to enable the
recently in Swindon especially clubs to assist each other and
for ZX80, ZX81 and ZX to co operate in areas of
Spectrum users. common interest. The ALCC
We hope to hold monthly aims to promote hobby and
meetings and run a software recreational computing, co
library for both copyright and ordinate the varied activities of
non-copynght material. For the clubs and to organize
more information on the club exhibitions, seminars and
contact me at the address meetings.
below. There are now 16 clubs
Sf Your faithfully, and the chairman and
secretary from each club will
air Andrew Bartlett. together form a clubs council.
s. 47 Grosvenor Road, The main work of the ALCC
nd Swindon, will now be carried out by 10
IS
Wilts. specialist sub committees
Tel: 0793 30770. concentrating on the above
ntly
V. mentioned areas of interest.
The list of computer club
members include:
international zx
ice Spectrum Club Croydon Micro Computer Club
Meetings are held in the
eas Central Reference Library,
d,
Dear ZX Computing, Kathenne Street on the first
in.
Our club will produce a bi- and fourth Tuesday of each
monthly magazine with month. For further information
Jay
software, hardware, reviews, contact Vernon Gifford on
contact addresses of other 01 653 3207 or Oavid Annal
users and news. The ob|ective on 01-764 4043.
of the club is to circulate
programs around the world. Harrow Computer Club
Meetings are held at the
For further details of the
Harrow College
club send an International
of Higher
r reply coupon to the following
Education.
:h address:
Room G43 on
International ZX Spectrum
t\e Club.
TEL: S T A I N E S 58041
Business users please note: Our PAYROLL program is now Post code
available for ZXS1 SPECTRUM. PET BBC and KONTRON Please
write tor floiails or send C2 00 lor comprehensive manual To Warp Factor EiglM. Dept ZXC
6 Pelham Road, Braughing Ware. Herts SG11 2QU
1
SPECIAL OFFER
/ am enclosing my (delete as necessaryJ
Cheque Postal Order International Money
Order for £
(mode payable to ASP Ltd/
OB
Debit my Access Barclaycard '
('delete as necessary/
UO
lnMrt cord no. 1 I 1 I I I 1 I I I I 1 I
513, LONDON ROAD,
THORNTON HEATH, Please use BLOCK CAPITALS and include post codes
SURREY. CR4 6AR N a m * (Mr,' M r s / M i t t )
ENGLAND. !<• i ri:: .
Please send my free binder and Address
commence my personal subscription
with the issue
£12.1 Of or 6 Issues
SUBSCRIPTION UK
RATES £15.60 for 6 Issues Signature
(tick ! - a s overseas surface
appropriati- £24.40 for 6 Issues
Air Mall Date
52
ZX81 EDUCATION
14-6 G O T O 80
150 REM S M A L L E S T
1 5 1 REM — • — —
14-20 P R I N T m
155 L E T B=31 14-30 PRINT
14-4-0 PRINT TAB • •y • wr • V ••
160 P R I N T T A B 3 ; * * * * * * * *
**»**'
165 PRINT TAB 3; "WHICH IS*3MALL 14-50 PRINT
EST * " ; R% ; * •
^170 PRINT TRB 3 ; " * * * * * *
1470 INPUT Z
175 PRINT 14-80 LET T=T + 1
180 PRINT 14-90 I F T =4 THEN GOTO 1530
14.95 CLS
1500 IF Z=X-Y THEN GOTO 9200
1510 GOSUB 9100
1520 GOTO 14-20
1530 PRINT
195 I F B > X T H E N L E T B =X 154-0 PRINT "WELL " ; A *
200 I F B > Y T H E N L E T B =Y 1550 PRINT " IU I L L H E L P Y O U NOU'
205 IF B > Z THEN LET B=Z 15B0 PRINT "THE ANSUER IS ".*. X - Y
210 REM S = R C T U R L SMALLEST 1570 PRINT " ****"
»
211 REM — — — — — — 1580 FOR 1=1 TO 100
212 REM B 1 - C H Q 5 E N S M A L L E S T 1585 NEXT I
213 REM f — i i — » H » 1590 GOTO 9035
215 INPUT B1 2000 REM GAME-STARCRASH
220 IF B 1 = B THEN GOTO 9200 2001
225 Rem • H H H M H
GOSUB 9100 2010 PRINT "LET US PLAY A GAME 1
230 GOTO 150 .: A *
1000 REM S I M P L E SUMS 2011 PRINT
1001 REM 20 1 2 PR I N T
1008 PRINT TRB 9 2013 PRINT
1009 PR I N T T A B 9 ; " * * * * * * * * * * * " 2014. P R I N T
1010 P R I N T T A B 9'; " S I M P L E SUMS' 2 0 1 5 P R I N T TRB
1015 PRINT TRB 9;"»»»»»*»»»* 2016 P R I N T TRB
1016 PRINT t a b 9; — a ^ m a s 2 0 1 7 PRINT TAB
1020 PRINT 2018 PRINT
1025 PRINT 2 319 PRINT
1030 PRINT 2 320 P R I N T "PRESS M TO STEER YOU
1035 PRINT TRB 10 NOLI A $ R SPACESHIP"
1040 PRINT 2021 PRINT "
1045 PR I N T 2022 PRINT
105<? Pf-. I N T TPS 6:"LET US DO SOME 2 0 2 3 P R I N T " I F YOU H I T A STAR TH
SUMS" S GAME ENDS"
1060 FOR 1 = 1 T O 200 2024- P R I N T " AND I W I L L T E L L YOU
1065 NEXT I YOUR SCORE"
;A 1070 CLS 2025 PRINT
* * 1075 RAND 202B PRINT
1080 L E T X = I NT f1+20+RND) 2027 PRINT
1090 LET Y = I N T I 1 + 2 0 + RND) 2 O 3 0 P R I N T " G E T R E A D Y - T H E GAME S
1100 LET A = I N T <1 + 1 0 * R M D ) TARTS SOON"
1105 I F A<6 THEN GOTO 1360 204-0 FOR 1 = 1 TO 120
1110 PEM RDDITION 204-5 NEXT I
1111 REM I — — — I 2050 CLS
1115 LET T = 0 2060 LET W=0
1120 FOR 1 = 1 T O 7 2 0 7 0 LET X = 10
1130 PRINT 2030 LET Y =15
1140 NEXT I =090 LET Z =20
1150 PR I N T 2 1 0 0 P R I N T RT Z.RND*30;"*"
2 1 1 0 P R I N T RT X Y : "
1160 PRINT 2120 LET U =U + 1
1170 PRINT TAB x; • «
f. *' t
. ** 2130 SCROLL
214-0 I F Y > 2 THEN L E T Y=Y-1
1180 PRINT 2150 I F INKEY $ = "M" RND Y<28 THEN
PR I N T LET Y=Y+2
2 1 6 0 P R I N T RT X . Y : " '*
* * 2 1 7 0 P R I N T RT l i . Y + l ;
1200 INPUT Z
CE 1210 LET T = T + 1 2130 IF PEEK (PEEK 16393+255+PEE
** 1220 I F T = 4 THEN GOTO 1250 K 1 6 3 9 9 ) < >23 THEN GOTO 2100
1223 CLS 2190 PRINT W
1225 I F Z=X+Y THEN GOTO 9200 2 2 0 0 FOR 1 = 1 TO 35
1230 GOSUB 9100 2 2 0 5 NEXT I
1240 GOTO 1150 2210 CLS
1250 PRINT 2220 PRINT
[ V 1260 PRINT "WELL ".; R $ 2221 PRINT
1270 PRINT " IU I L L HELP VOU NOU" 2222 PRINT
1280 PRINT " T H E ANSWER I S ";X+Y 2223 PRINT
1290 PRINT " ' ****" 2225 IF W> 50 THEN GOTO 2230
1300 FOR 1 = 1 T O 100 2230 PR I N T " N O T B A D " ; A J,
1310 NEXT I 2231 PRINT "YOUR SCORE W A S . . " '
1350 GOTO 9 0 3 5 s'235 PRINi
1360 REM S U B T ^ A ^ O N 224-0 PRINT "WAS THAT FUN?"
1365 224-5 PRINT
1370 IF X ^ Y T H E N G ^ T O 107® 2250 PRINT "LET US DO SOMETHING
1380 LET T =0 ELSE NOU"
1390 FOR 1 = 1 T O 7 2260 FOR 1 = 1 TO 45
1400 PRINT 2265 NEXT I
1410 NEXT I 2270 GOTO 9035
983
ZX C O M P U T I N G FEB, MARCH 1983 54
1150 PRINT fifl) ;*' 14-21 PRINT
1155 NEXT I 44-25 PRINT -YOUR NUMBERS UERE
1158 LET C=0
1160 REM R » S O R T * E N T E R N U M B E R S 1430 PRINT
1161 REM mmmmmmmmmmmmm 4435 FOR 1 = 1 TO i
1165 PRINT 44-40 PRINT B < I J '
1166 PRINT 1445 NEXT I
1170 PRINT "YOU ENTER THE N U M B E R 44-50 PRINT
5 NOU" 44-51 PR I N T
1171 P R I N T 4455 PRINT "FROM S M A L L E S T TO BIG
1175 P R I N T " S H R L L E S T F I R S T TO B Z 3EST "
3GEST L A S T " 1460 PRINT •THE NUMBERS SHOULD B
1177 P R I N T
1180 D I M B ( 6 ) 4465 PRINT
1185 F O R 1 = 1 T O 6 1470 FOR 1=1 TO 6
1190 I N P U T B f U 4 4 7 5 P R I N T FL(I) ; "
1195 P R I N T B C D ; " 44-80 N E X T I
1196 I F B ( I ) = R ( l i OR B ( I J = R ( 2 ) O 44-85 P R I N T
R B ( I ) =R ( 3 ) OR B ( I ) = f l ( l ) OR Bfl) 1186 PRINT
=RC5) OR B C D = R ( S J T H E N G O T O 419 4189 PRINT "THERE YOU ARE " R ®
3 1190 PRINT "CHECK UHERE YOU UENT
1197 GOTO 4500 URONG"
1198 N E X T I 4
* 1* 9* 1* * *P*R*I*N*T* * * * * * * * * * * * * * * * * * * * * *
1199 FOR 1 = 1 T O 12
*2©0 N E X T I 4192 FOR 1=1 TO 75
1 2 0 1 REM Z X S O R T T H E NUMBERS 4493 NEXT I
1202 REM 1191 PRINT
1203 L E T K=0 4195 PRINT "NOU TRY SOME SIMPLE
1205 FOR 1 = 1 T O 5 SUMS"
1208 I F R ( I ) > R ( I > 1 ) T H E N G O T O 4-2 4 1 9 6 F O R I=*L T O 1 5
15 4197 NEXT I
1210 GOTO 4230 4198 CLS
1215 LET T=A(IJ 4199 GOTO 1000
3-220 LET A <I) = R ( I + L ) 4500 REM INVALID NUMBER INPUT
1225 L E T R ( I + 1 ) = T 1501 REM wmmmmmm
1226 L E T K = K + 1 4510 PRINT
1230 N E X T I 1520 PRINT 'URONG NUMBER-NOT IN
1231 I F K = 0 T H E N G O T O 1250 MY L I S T "
1232 GOTO 4 2 O 0 4
*5*2*1* * *P*R"I N T * * * * * * * * * * * * * * * * * * * *
1250 REM C O H P R R E Z X + R S SORTS
1251 R E M — — m m m m m m m m m m i 4525 PRINT
1255 FOR 1 = 1 T O 6 4530 PRINT "LET US START RGRIN'
4510 FOR 1=1 TO 35
1260 IF R C I ) O B ( Z ) THEN GOTO 4-3® 4515 NEXT I
4550 CLS
1265 REM
1270 N E X T C OI R R E C T R N S U E R GIUEN 4560 GOTO 41O0
1 2 7 1 REM " 3000 REM REURRD G R M E S
1272 P R I N T 3001 REM
1273 P R I N T 3005 RRND
1274 P R I N T 3 0 1 0 L E T G = I N T (1 + 1 0 * R N D )
1275 P R I N T T R B 5.; *' * * * U E L L DONE 3 0 1 5 IF G <1 T H E N G O T O 8100
;fi$.; • • * * * " S 0 2 0 IF G > 7 T H E N G O T O 8600
1278 P R I N T 3100 REM RRCING CRR
1280 PR I N T T A B 5.; " N O U Y O U C R N PL. 3110 REM
3Y O BBBB" * * * * * * * * * * * * * * * * * * * * 3115 PRI
1281 P R I N T " 3120 PRINT •RRCING CRR"
************ 3130 PRINT v » v » % v » s v v
1285 FOR 1=1 TO 35 3131 PRINT
1288 NEXT I 3132 PRINT
1 2 9 0 CLS 3133 PRINT
1295 GOTO 8 0 0 0 3131 PRINT
1300 REM U R Q N G P N S U E R G I U E N 3135 PRINT 'RRCE YOUR CRR ROUND
1301 r e m m n i mmmm THE TRACK"
131© L E T C = C + 1 3137 PRINT
4315 I F C = 3 T H E N GOTO 14-O0 3110 PRINT BUT DO NOT HIT THE S
IDES"
5.320 C L 5 3115 PRINT
1325 P R I N T " N O R $
1327 P R I N T S
•i
15© PRINT OR THE GAME WILL END
1330 P R I N T NOT Q U I T E RIGHT"
1335 P R I N T 3155 PRINT
1340 P R I N T 3156 PRINT
YOUR NUMBERS UERE 3157 PRINT
5158 PRINT
1345 PRINT 3160 PRINT "PRESS TO GO LEFT
4350 FOR 1 = 1 T O 3165 PRINT
1355 PRINT B ( I ) 3170 PRINT PRESS M TO GO RIGHT"
1360 NEXT I 3175 PRINT
1365 PRINT 3176 PRINT
1366 PRINT 3180 PRINT "THE GRME STARTS SOON
1376 PRINT "NOU T R Y RGRIN"
1375 GOTO 4 1 6 0 3135 FOR 1=1 TO 50
1400 REM H E L P N O U N E E D E D 3188 NEXT I
1401 REM 3190 CLS
1405 CLS 3200 LET U=10
1410 PRINT " U E L L " A* 3210 LET X=10
44-15 PRINT " I U I L L HELP YOU NOU 3220 LET Y =20
1420 PRINT 3230 LET Z=9
mm
**
9033 NEXT I
3620 FOR 1=1 TO 5 9035 CLS
3625 PRINT 9040 REM SELECTION OF RCTIUITIE
3630 NEXT I
3635 PRINT '
9041 REM i
RS THE STRR FRLLS 9045 FOR
FROM THE" 9048 NEXT I
3540 PRINT 9049 RRND
3645 PRINT ' SKY.YOU TRY TO CRT 9 0 5 0 L E T R = I N T (1 + 1 0 » R N D )
CH IT" 9 0 5 5 IF A < 7 T H E N G O T O 9090
3650 PRINT 9060 LET B=INT (1*10*RND)
3655 PRINT ' PRESS Z TO GO LEFT 9 0 6 5 IF B > 7 T H E N G O T O 2000
9 0 7 0 L E T C = I N T (1 + 1 0 * R N D )
56
ZX81 EDUCATION
9075 I F C < 4- T H E N GOTO 3 0 0 0 9230 PRINT
GOTO 4-000 •i
3090
3095
LET D = I N T (1+10*RND)
I F D < 6 THEN GOTO 10
9235 PRINT •
9096 GOTO 1000 JS' *
3100 924-0 PRINT
REM
3101 a-
3102 PRINT 924-5 PRINT
9105 PRINT "NO " : R$ ; " .TRY ftGfilN"*
9110 PRINT
?•2FF
50 PRINT w m
934-0
334-5
PRINT
PRINT
"
"
*
*
*
* *••
*"
* * *
33S0 PRINT "
3355 PRINT "
3360 NEXT I
3365 GOTO 9035
9600 REM O P E N I N G T I T L E PRGE
9801 REM • ^ • • • • • • • • • • • 1
9805 FOR 1 = 1 TO 5
9810 PRINT
3815 NEXT I
9820 PRINT
9 8 8 ^ P R I N T
9385. PR
Not an easy game this! You not always destroy the aliens. If The control keys for the Once the program has been
have three ships, and your mis- an invader hits you then you will game are as follows: typed in and RUN, you will have
sion is to rid the planet's surface lose one of your ships. The only to wait four seconds for the
of invading aliens. way to get more ships is to in- The '1' key moves your ship game to start not long really,
Each time you fire a missile at crease your score; you will get down when you consider the fate of
an invader and destroy it you an extra ship when your score The 'Q' key moves your ship up Earth is in your hands!
will be awarded 60 points but increases to 5,000, 10,000, The 'P' key fires a missile
watch out, your missiles may 1 5,000 and 20,000. The 'T' key stops the game
my first
16397
9510 IF PEEK I 234 THEN GOTO 9590
9520 LET 1 = 1+1
9530 IF PEEK 1=118 THEN GOTO 9590
machine
9540 LET A = PEEK I
9550 IF A63 THEN GOTO 9520
9560 LET A = A + 1 28
9570 POKE I,A
code
9580 GOTO 9520
9590 NEXT I
9600 LIST Listing ,
program
Line 9500 finds the end of the Unfortunately, it takes th
program area, and sets up a program three seconds to
FOR . . NEXT loop to search achieve this. Admittedly, thre
the listing. Line 9510 checks if seconds is not long to wait,
the byte is a REM keyword. If if this program had to so
not, it jumps to line 9590 and through a 1 5K program it would
lan Turtle, of Ashbyf back around the loop. Once a take minutes. To be frank,
REM statement is encountered, thought this would be mor«|
Scunthorpe, explains then it begins to execute the trouble than it is worth.
lines 9520 to 9580. Line 9520
how he got to grips with increments the I count to the
next byte in the REM statement.
Eureka!
machine code, the Line 9530 checks for a
NEWLINE, and the end of the The obvious answer was to
REM statement. If the end of the put it into machine code. Unless!
problems he faced, and REM has been found, then the you are a computer fanatic, then|
program again begins to search I would not tightly recommen
the triumph he achieved. for another REM in memory. If you take the drastic step od|
the end has not yet been reach- deciding to tackle machine!
ed, then the code of the code.
character is checked. If it is If you find BASIC programn
greater than 63 then it is likely ing makes you tear your hair out I
to be a keyword with no inverse, in frustration with its error!
or a letter/number that is messages as you debug yourl
already reversed, so the loop latest masterpiece, do not at-
skips this byte. tempt to write machine code, orI
If its value is less than, or you'll soon need the services of I
equal to, 63, then 1 28 is added a hair-transplant specialist. It >s]
to the value to get the inverse the most frustrating experience I
(line 95601. Line 9570 then have ever gone through. Despite I
POKEs this value into memory this, the result were well worth)
and line 9580 returns to check all the effort.
the next byte in the program. The frustration made mel
Enter the program, and add a write a simple BASIC program to
line tike 9951 REM XXXXXXXX aid the development of machine
and RUN the program. The code, but more about that later.
listing will appear with the Xs Eventually, the program was
after the word REM in inverse as written and debugged, and >s|
This is an account of how required. shown in Listing 2.
wrote my first program in
machine code, following the Op-code Hex Decimal Bytes
study of Toni Baker's book START LD HL, 1 6549d 21A540 33,165,64 3
'Mastering Machine Code on the LD DE,(1 6396)d ED5B0C40 237,91,12,64 4
2X8 V. It was a real struggle to INC HL 23 35 1
get the program actually work- ENOCH LDA.D 7A 122 1
ing, as many of my initial CP H BC 188 1
assumptions were proved JRNZ REMCH 2003 32,3 2
wrong. LD A,E 7B 123 1
At first, I wrote a BASIC pro- CP L BD 189 1
gram to search through a pro- RET Z C8 200 1
gram, and convert all the letters, REMCH LD A(HL) 7E 126 1
numbers and the like to inverse CP 234d FEEA 254,234 2
video; this not only looks good, JRNZ ENOCH 20F3 32.243 2
but allows REM statements to INREM INC HL 23 35 1
stand out in listings so long as LD A,(HL) 7E 126 1
there are not too many PRINT CP1 18 FE76 254,1 18 2
statements in the program. JR Z ENOCH 28ED 40, 237 2
The program sat at the bot- CP 64 FE40 254,64 2
tom of program memory, and JRNC INREM 30F6 48,246 2
had to be typed in after the pro- ADD A, 128 C680 198,128 2
gram which I wanted to LD (HL),A 77 1 19 1
transform had been entered. My JR INREM 18F1 24,241 2
BASIC program to do this is Listing 2
shown in Listing 1.
983
Z X C O M P U T I N G FEB, MARCH 1983 60
MACHINE CODE
the four 'line number' digits made to work. However, the
reading 00 OA 06 00. papers with a disassembled
Strangely, the computer has a listing (BASIC) were close to
'double standard' here. The hand. It was while rereading
line number is stored with the these that the idea of using the
high byte followed by the low length of line indicator oc-
byte. The length of the line, cured. Obviously, I cannot
lowever, is stored the other claim monopoly on this idea -
way round, with the low byte I had read of its use elsewhere,
first. but I had not previously
thought of using it here.
Back to the Anyway, it sounded rather
complex. In fact, it did cause
beginning the machine code to be a little
To return to the original pro- more complicated, but not too
blem, the line number 3050 difficult.
The machine code listing
BrtJl will be stored in memory as
OBEA, where EA is the value was longer, but it used the fact
the program searches for. So, that the REM indicates the end
of a listing by two Newlines on
the length of line marker will be
overwritten - not a good way the trot to check for the end of
to keep a bug-free program. the program. It was with this
With this knowledge, it is ob- listing I was finally satisfied.
vious that there is a set of HL was loaded at START with
numbers that would cause this 16509 since I had finally
problem. It was luck that un- decided to go for storing the
covered this bug (the numbers machine code above RAMTOP
are 234, 490, 746, 1002, for more convenience. This
1258, 1514, 1 770. . .). was done as follows:
Programming in machine code can make you old before your time
This was all very satisfying ENTER POKE 16388,216
in its way, but it meant the POKE 16389, 127
This is simply a straight the actual machine code original machine code program
translation of the BASIC into loader' program. For some NEW
was practically useless, as it
machine code. Location reason, it corrupted the line
would have meant the user Then the machine code can be
16514 inwards lie a REM which read:
had to search through the written, starting at address
statement as the first line of a
3050 IF 8$ = " D " THEN LET listing and change every occur- 32729.
ZX81 program) is my favourite
A$ = STR$ B rence of the line number set to So, after many hours , the
place to store machine code,
something else, running the listing below was produced,
so the program was written to
code, then changing them all which did the job demanded of
occupy these memory loca- To find out why, it was
necessary to find out how the back. A return to the BASIC it in the blink of an eye.as op-
tions. In theory, however, the
8K ROM stored line numbers. listing would obviously be a posed to minutes. I tested it on
program is completely
I discovered that the com- better idea. "Back to the draw- the longest program t could
relocatable, as there are no JPs
puter stores a tine number in ing board", I thought, and at- find, and it took no noticeable
as opposed to JRs (things you
four bytes. The first two bytes tempted a new approach. running time at alt. As a con-
have to come to terms with
contain the value of the line I do not think it is just me. clusion, I'd say that if you're
when programming in machine
code}. In practice, this number, and the second two However, I find it very difficult willing to stick at programming
assumption proved incorrect. bytes indicate how many to produce a brand new in machine code, the results
bytes long the line is. So a line method, or idea, straight after will be well worth the cost in
The HL register at the start
10, LET A PEEK 1, would have an old one had been tested and frustration.
of the listing is set to 1 6549
instead of 16509 to skip over
the actual REM statement. If Op-code Hex Decimal Bytes
this was not done, the START LD HL, 1 6509d 217D40 33,125,64 3
machine code would search LSKIP INC HL 23 35 1
itself, find the 243d one in- INC HL 23 35 1
struction after REMCH and LD E,(HL) 5E 94 1
assume this was a REM state- INC HL 23 35 1
ment. Then rt would alter all LD D.IHLI 56 86 1
the machine code which INC HL 23 35 1
followed, until it reached the LD A(HL> 7E 126 1
118 two instructions after IN CP 234d FEEA 254,234 2
REM. Obviously, this would JRZ ENDCH 2807 40,7 2
cause a crash. ADD HL.DE 19 25 1
If, then, the machine code LDA,(HL) 7E 126 1
was relocated, it would still CP 1 18d FE76 254,1 18 2
begin its search at memory RET Z C8 200 1
location 16549, and miss any JR LSKIP 18EE 24,238 2
early REM statement. The ENOCH INC HL 23 35 1
solution was simply to LD A,(HL> 7E 126 1
substitute 16509 in START. CP 1 18d FF76 254,1 18 2
The idea behind relocating JRZ CONTS 2809 40.9 2
the routine was to place it CP 64d FE40 254,64 2
above RAMTOP, to save hav- JRNC ENDCH 30F6 48,246 2
ing to reload machine code ADD A,128 C680 198.128 2
over and over again in a pro- LD (HL), A 77 119 1
gramming session. However, JR ENDCH 18F1 29,241 2
disaster struck when the CONTS INC HL 23 35 1
machine code was used to in- JR LSKIP 18DC 24,220 2
Listing 3
vert all the REM statements in
Plus: F O O T B A L L , D I G I T I S E R , D I A R Y a n d m a n y m o r e .
THE P R O G R A M S
T h e programs advertised here are My Access Barclaycfll No i*
available f r o m c o m p u t e r bookshops w i t h
Signed
a s o f t w a r e stand, and m a n y independent
Post to H E W S O N C O N S U L T A N T S . OEPT SU 80A St M A R Y S STREET W A L L I N G F O R D O X O N OXIOOEL
m i c r o - c o m p u t e r shops. TEL 10*911 36307
62 Z X C O M P U T I N G F E B / M A R 19B3
Scrolling
Z X 8 1 UTILITIES
screen
window!
J Elliott from
Gloucester
describes some
machine code
routines he has
developed to
emulate some screen
controls available on
more sophisticated computers.
As a teacher I have access to The first routine defines a character on the screen is prompted to enter size and
both an RML 380Z and 4 8 0 Z rectangular window of any removed and replaced with its positions for your window or
in the course of teaching size at any point on the screen. inverse. This is very effective scroll window and also fill
Computer Studies. These Once defined, the window can for explosions. character. Having done this
computers allow fairly easy be instantly filled with any you are offered the option of
screen control. In particular character, or cleared, simply Using the routines redefining, testing or ending
they allow the definition of by calling the routine. Any of the program, When you end
"screen windows" at any these parameters can be The easiest way of using the the program is automatically
point on the screen. These changed at any time from the routine is as follows; 'NEWed' so that you can easily
windows may be scrolled master program. This means First type in listing 4 and enter the BASIC code which
independently of the remainder that several different windows save at least twice. will call the routines.
of the screen. In addition to can be used with the same Save 1 14 bytes of high To call the routines, the
this, the "GRAPH" command program. memory by poking addresses following commands can be
restricts scrolling to the The second routine uses the 1 6 3 8 8 and 1 6 3 8 9 with a new inserted at any point in the
bottom four lines of the same principle as the first. A value for ramtop. With a 16K BASIC;
screen. window is again defined — any machine, suitable values are ; i) Fill or clear window LET
My own ZX 81 does not size and any position on the POKE 16388,140 POKE L = USR START
have these facilities. The screen. When the routine is 1 6389.127. iil Scroll one line of window
"PRINT AT" command is the called, the contents of the If you now enter 'NEW' you - LET L - USR (START + 39)
nearest equivalent. I decided window are scrolled up will have the space above iii) Inverse screen-LET
to attempt to emmulate these through one line and the last 3 2 6 5 2 free for the machine L - USR ( S T A R T + 94)
facilities with machine code line is cleared. The routine can code. Where START is the start
subroutines. The three be set to fill the last line with Now reload listing 4 and address of the machine code
routines to be described any character instead of 'RUN'. The code will be loaded which must have been
increase the screen handling clearing it. to the area of memory you previously loaded the
abilities of the ZX81 quite The last routine is a very enter when prompted by the parameters of the windows ^ ^
considerably. simple screen reverse. Every program. You will now be can be changed easily from ^
1983
ZX COMPUTING FEB MARCH 1983 64
2X81 UTILITIES
190 PRINT AT 4.0; "ENTER FINISH C O L U M N "
195 INPUT H
200 PRINT AT 4 , 0 ; "ENTER FILL SCROLL C H A R A C T E R "
205 INPUT K $
210 IF {((CODE K$ > 6 3 ) A N D (CODE K $ < 1 2 8 ) ) OR (CODE
K$ > 1 9 1 ) ) THEN G O T O 2 0 5
220 LET L = 0
230 CLS
240 IF D$ = "2" THEN GOSUB 4 0 0
250 POKE B + 5. F
260 POKE B + 7, F E
270 POKE B - 20, 32 G
280 POKE B + 25. 32 (G + H)
290 POKE B + 3 0 L. CODE K$
300 GOTO 8 5
400 LET B - B f 39
410 LET L = 16
420 RETURN
500 CLS
510 PRINT "ENTER 1 TO TEST YOUR W I N D O W . 2 TO
REDEFINE OR 3 TO NEW THE P R O G R A M "
520 LET M$ - INKEY$
530 IF M$ < " 1 " OR M$ > " 3 " THEN G O T O 5 2 0
540 IF M $ " 3 " THEN NEW
550 IF M $ - " 2 " THEN G O T O 8 5
560 LET N = USR B
570 FOR P - 1 TO (F E)
580 LET N USR (B+ 39l
590 NEXT P
600 PAUSE 1 0 0
610 POKE 1 6 4 3 7 , 2 5 5
620 GOTO 500
Listing 5:
Demonstration
routine
10 REM SCREEN ROUTINES MUST BE IN MEMORY
20 PRINT "ENTER START ADDRESS OF MC ROUTINES"
30 INPUT A
40 CLS
50 LET B = INT(RND* 22I + 1
•E
185 INPUT G 410 RETURN
65 ZX COMPUTING FEB'MARCH 1 9 8 3
ZX81 CAME
Rat Race is a game for two ti
four players and occupies 4K o
memory, so you'll need you
1 6K RAM Pack.
Each player has a rat ead
and £ 2 0 0 with which to have!
:
bet (you may only bet on you
rati. If your rat wins then yo
win the amount you wager
and this is added to your cas(
total. Should you lose, tN
amount of your flutter «
deducted from your cash total
Should your cash total read
zero, you are pronounced brofci
ZX COMPUTING FEB/MARCH 1 9 8 3 67
The Memotech approach to microcomputing is to take the well-pn
and popular ZX81 as the heart of a modular system. This small
computer houses the powerful Z80A processing unit and acts as th
central processor module through which the MEMOPAKS operate
Memotech has a reputation for professional quality, producing un
which are designed to fit perfectly, to look well-balanced, and tow
efficiently and reliably.
The modular approach gives ZX81 owners the freedom to design th
system they really need Furthermore, the intercompaiibilily of the
modules ensures that later additions will click straight in, to give yo
system that grows with your ambitions and abilities.
MEMOCALC The screen display behaves as a window" on As one example, a system with 16K of memory and MEMOCALC i$l
a large sheet of paper on which a table of numbers is laid out. that is required to perform sophisticated numerical calculations gii
The maximum siie of the table is determined by Ihe memory the same results as a computer at 10 times the price. The problem r
capacity, and with a MEMOPAK 64K a table of up to 7000 be as complicated as a cash flow or production schedule, or as sir
numbers with up to 250 rows or 99 columns can be specified. as household accounts or pocket money budgeting. If the bank
Each location in the table can be either a number which is keyed manager wants to see the cash flow, then a single print instruction t
in or a formula which generates a number. Every time the the Centronics 1 F will give a printout which is more than acceptablew
command lo 'calculate' is given, all the formulae in the table are any bank.
re-evaluated Spreadsheet analysis started as an aid to
cash-flow analysis, but this powerful tool has now been The example system which is shown, on the other hand, would satisl
generalised and MEMOCALC with its special ability to perform the needs of someone who wanted to enter data via a light-touch
iterative calculations is invaluable in the performance of keyboard, construct and label graphs, and then copy the screen to an|
numerical tasks. 80-column printer. Only 16K of memory is used here but with
additional memory, more than one video page can be stored. Up loTj
successive pages can be displayed cyclicly to give animated dispia
MEMOPAK Z80 Assembler This click-in EPROM MEMOTECH Keyboard The light-touch positive stop
basea pack accepts standard Z80 assembly language keys of this elegant typewriter-pitch keyboard allow you to work
mnemonics to allow you to write faster and more compact faster, more accurately and more confidently. To speed you
programs. It has its own ADD, EDIT. LIST, A S S M and QUIT along we have added an extra SHIFT key to the array at top right.
functions, the editor allowing insertion, deletion, automatic line The keyboard is attached by a cable to the Keyboard Buffer
renumbering and error checking. Source code and object code which fits m amongst your other Memopaks or straight onto the
listings can be displayed and printed in decimal or hex format. back of your ZX81.
«
ZX81 DOMESTIC
^ Monday St vnnvw
Week 7 4S 320
r m
ft
i
T f
1
2 j
written a program he i m
finds particularly useful
for noting past events
and future
commitments.
g Saturday
16 WednesdayW««k 7 47-318
w»dt*s0»Y
Week 7 50 31i
i f l o Tlppl
• ^ o LAaca - A A W W ^ T
,
R NUMBER" , . . . " 1) MAKE E N T R Y '*,.,. " 2 FOUND"
i DISPLAY L I S T " . " 3 J PRINT LIST" 5165 PRINT
j < " 4.) F I N D NAME " , " 5 ) FIND DATE" 5170 PRINT " M E N U OR C O P Y ? "
5 1 8 0 INPUT C $
90 INPUT R 5 1 9 © I F C * = " M " T H E N GOTO 6 ©
100 GOTO A * 1 0 Q © 5 2 0 0 I F C $ = " C " T H E N COPY
1000 CLS 5 2 1 0 GOTO 8 ©
1010 LET X = i 6000 CLS
1020 I F A $ ( X .. T O 3 > = " E N D " T H E N < 6010 P R I N T '
0T0 107©
1030 I F A f <X) = B $ T H E N G O T O 1100 >020 PRINT S C. E ' I * * '
1040 LET X = X + 1 6030 INPUT
0 105© GOTO 1 0 2 0 604© IF U $ = " Y " T H E N G O T O 6©5©
r- 1070 P R I N T " NO N O P E POOl" 6050 PRINT RT 10.11;"SAUING BEGI
a 1100 CLS N5 "
n 1110 P R I N T " E N T E R NAME A N D D A T E . 6055 PAUSE 8 0
K
6056 SRUE " D I A R ® "
1120 INPUT A $ ( X) 6060 CLS
l.
•E
1130 INPUT Z*(X) 6070 GOTO ©0 '
71 ZX COMPUTING FEB'MARCH 1 9 8 3
Sinclair ZX Spect
16Kor 48K RAM...
full-size moving-
key keyboard...
colour and sound...
high-resolution
graphics...
From only
£1251 First, t h e r e w a s t h e w o r l d - b e a t i n g
S i n c l a i r Z X 8 0 . T h e first personal c o m p u t e r
for under £ 1 0 0 .
Then, t h e Z X 8 1 . W i t h up to 16K R A M Ready to use today,
available, a n d the Z X Printer. Giving m o r e
easy to expand tomorrow Key features of the Ci
p o w e r a n d m o r e flexibility. Together,
t h e y ' v e sold over 5 0 0 , 0 0 0 so far, to m a k e Your Z X S p e c t r u m c o m e s with a mains
Sinclair ZX Spectrum
Sinclair world leaders in personal a d a p t o r a n d all t h e necessary leads to • Full c o l o u r - 8 colours e a c h for
c o m p u t i n g . And t h e Z X 8 t remains the 0«-
c o n n e c t t o most c a s s e t t e recorders foreground, b a c k g r o u n d and bordC ai
ideal low-cost introduction to c o m p u t i n g a n d TVs (colour or black a n d white). plus flashing a n d brightness-intensf^ 0
N o w there's the Z X S p e c t r u m ! W i t h Employing Sinclair BASIC (now u s e d control. Sin
up t o 4 8 K of R A M . A full-size moving-key in over 5 0 0 , 0 0 0 c o m p u t e r s worldwide)
• S o u n d - B E E P c o m m a n d with variat(His
keyboard. Vivid colour a n d sound. High- the Z X S p e c t r u m c o m e s c o m p l e t e with
pitch a n d duration.
resolution graphics. And a low price that's two manuals which together represent a
unrivalled. d e t a i l e d course in BASIC p r o g r a m m i n g . • Massive R A M - 1 6 K or 48K. •B
W h e t h e r you're a beginner or a c o m p e t e n t
Professional power- p r o g r a m m e r , you'll find t h e m both of im-
I Full-size m o v i n g - k e y keyboard- all soi
keys at n o r m a l typewriter pitch, wits rec
personal computer price! m e n s e help. D e p e n d i n g o n your c o m p u t e r
e x p e r i e n c e , you'll quickly b e m o v i n g
r e p e a t facility on e a c h key.
T h e Z X S p e c t r u m incorporates all into t h e colourful world of Z X S p e c t r u m i High-resolution - 2 5 6 dots
the proven f e a t u r e s of t h e ZX81. But its professional-level computing. horizontally x 192 vertically, each '
n e w 16K BASIC R O M dramatically There's no n e e d to stop there. T h e individually addressable for true higlr
increases your c o m p u t i n g p o w e r Z X P r i n t e r - a v a i l a b l e now - is fully resolution graphics. fur
You h a v e a c c e s s t o a range of 8 c o m p a t i b l e with t h e Z X S p e c t r u m . A n d larc
' ASCII c h a r a c t e r set - with upper
colours for foreground, b a c k g r o u n d and later this y e a r t h e r e will b e Microdrives for Co
l o w e r - c a s e characters.
border, t o g e t h e r with a sound g e n e r a t o r massive a m o u n t s of e x t r a on-line storage, fCO
a n d high-resolution graphics. plus an R S 2 3 2 / n e t w o r k interface board. ' T e l e t e x t - c o m p a t i b l e - user software c o
You h a v e the facility to support c a n g e n e r a t e 4 0 characters per line I dri
s e p a r a t e d a t a files. or other settings.
You h a v e a c h o i c e of storage c a p a -
* High s p e e d L O A D & SAVE-l6KinlO(
cities ( g o v e r n e d by t h e a m o u n t of R A M ) .
s e c o n d s via cassette, with VERIFY!
1 6 K o f R A M (which y o u c a n u p r a t e later
M E R G E for p r o g r a m s and separate
to 4 8 K of R A M ) or a massive 4 8 K of R A M
d a t a files
Yet t h e price of the S p e c t r u m 16K
is an a m a z i n g £ 1 2 5 ! E v e n t h e popular i Sinclair 16K e x t e n d e d 8 A S I C -
4 8 K version costs only £ 1 7 5 ! incorporating unique'one-touch'
You m a y d e c i d e to begin with the k e y w o r d entry, syntax check, and Sii
16K version. If so. y o u c a n still return it later
for a n u p g r a d e . T h e cost? A r o u n d £ 6 0
report c o d e s MCl
Is
The ZX Printer- The ZX Microdrive-
available now coming soon
D e s i g n e d exclusively for use with the T h e n e w Microdrives. d e s i g n e d
Sinclair Z X range of c o m p u t e r s , the especially for the Z X S p e c t r u m , are set t o
printer offers Z X S p e c t r u m o w n e r s t h e full c h a n g e the f a c e of personal c o m p u t i n g
ASCII c h a r a c t e r s e t - i n c l u d i n g l o w e r - c a s e by providing m a s s on-line storage.
c h a r a c t e r s a n d high-resolution graphics. E a c h M i c r o d r i v e c a n hold u p to 100K
A special feature is C O P Y which bytes using a single i n t e r c h a n g e a b l e
prints out e x a c t l y w h a t is on t h e w h o l e TV storage m e d i u m
s c r e e n without t h e n e e d f o r f u r t h e r T h e transfer r a t e is 16K by tes per
instructions. Printing s p e e d is 5 0 c h a r a c - second, with a n a v e r a g e a c c e s s t i m e of
ters per s e c o n d , with 3 2 c h a r a c t e r s 3.5 seconds. A n d you'll b e a b l e t o c o n n e c t
per line a n d 9 lines p e r vertical inch. up to 8 Microdrives to y o u r S p e c t r u m via
T h e Z X Printer c o n n e c t s to t h e rear of t h e Z X Expansion M o d u l e .
your Z X S p e c t r u m . A roll of p a p e r (65ft A r e m a r k a b l e b r e a k t h r o u g h at a
long a n d 4in w i d e ) is supplied, along with r e m a r k a b l e p r i c e . T h e Microdrives will b e
full instructions. Further supplies of p a p e r available in t h e early part of 1 9 8 3 for
are available in p a c k s of five rolls. around £ 5 0 .
This program was devised to la) The motor efficiency. method of achieving it to ap- When the program is run, lines
simulate the electrical condi- (b)The motor power factor. pear. 1 0 0 0 to 11 3 0 generate the.
tions which occur when a single (c) The input Volt Amperes. The motor takes a random questions to be answered, and
phase A C motor is in operation. (dIThe reactive power. current of between 1 and 10 the methods to be used. The re-
The first section of the pro- Amperes. The supply voltage is mainder of the program is
gram draws a circuit diagram Information can be obtained constant at 2 4 0 V . This voltage d e v o t e d to displaying the
which represents the motor con- from the program in order to is chosen because it is the stan- answers entered and to show-
nected to an electrical supply, devise a solution to these pro- dard value of the single phase ing the user how to correct
with instruments in circuit to blems. If you want to delve a bit supply in this country. The cur- them, if necessary.
measure current, voltage and more deeply into the electrical rent is limited to simulate prac- There is no way round the
the input power. Readings of theory involved, then an elec- tical conditions; if the voltage fact that a program of this type
these values and also of the trical text book must be con- was to be higher, then a three is rather long (this one takes
power output of the motor are sulted. phase system of supply would about 8K) as every eventuality
shown in the diagram. These A teaching program should have to be used. must be catered for. The disad-
values appear when the motor is be designed to correct wrong vantage of any teaching pro-
operated. answers. Entry of a wrong gram is the amount of memory
Since the program is used in answer causes the program to Motor ways that is used. Once it is made up.
the teaching of basic electrical display how the correct one Lines 10 to 9 8 0 print the however, it can be used over
principles, it now asks you to should be obtained. A further diagram and set the variables. If and over again. It often also
enter the values of four quan- entry of a wrong answer causes a different voltage, say 110V, is forms the basis for a new pro-
tities. These are: the correct solution, and the required, simply alter line 750. gram at a later time.
I
620 F O R X = 3 0 T O 4*0
MOTE THE UALUES 6 3 0 PLOT X , 10
PRESS NEULINE 640 PLOT X,5
1152 U 6 5 0 NEXT X
TO C O N T I N U E
I OUTPUT
660 FOR Y =6 TO
6 7 0 PLOT 39,Y
10
t>88 N E X T Y
682 PRINT RT 14,1;"PRESS NEULIN
E "
683 PRINT AT 15,2;"TO START MOT
A sample screen display showing a circuit of a single phase motor OR"
684 INPUT D$
685 PRINT RT 1 4 , 1, "
•E
466 P R I N T R T 5.20;"U" 1016 PRINT
75
1805 P R I N T "OUTPUT/INPUT = "; o; " / " 3520 PRINT "UHERE G IS THE PHRSE
iU; " = " l E F ANGLE"
1806 P R I N T 3530 PRINT
1807 P R I N T 3540 PRINT "NOU UHRTS THE RNSUER
1606 P R I N T *»
3 5 5 0 GOTO 1121
1809 I N P U T Z $ 4000 PRINT " U R N T MORE INFORMRTIO
1810 R E T U R N N ? YES/NO"
1650 P R I N T 4-010 RETURN
1651 P R I N T " Y O U R RN5UER I S STILL 4020 PRINT
INCORRECT 4025 PRINT 1
1852 P R I N T 4030 RETURN
1853 P R I N T " R N S U E R T O P O U E R FACT 4040 PRINT '
OR = " 4050 PRINT
1854 P R I N T " I N P U T U R T T 5 / U O L T 5 XR 4 060 PRINT ' E F F I C . O F MOTORs";El
HP5 = " 4 0 7 0 RETTURN
1855 P R I N T u ; u ; " * " ; A ; " =" ; P F ; 4080 PRINT " P O U E R F R C T O R OF MOTO
" LRG" R=";Pl;" LRG"
1856 P R I N T 4090 RfcTURN
1857 P R I N T 4100 PRINT "UR INPUT = " ; S l ; " UR . "
1858 P R I N T c p r = =
4110 RETURN
4120 PRINT "RERCTIUE P0UER=";01;
1859 I N P U T Y $ » URR."
1860 R E T U R N 4130 RETURN
1900 P R I N T
1902 P R I N T "YOUR RNSUER I S STILL
INCORRECT"
1904 P R I N T " R N S U E R T O UR I N P U T a "
; V; " * " ; R ; " = " ; S ; " UR . "
1905 P R I N T CRLCULATE THE FOLLOUING
1906 P R I N T
E N T E R YOUP. A N S W E R S
1907 P R I N T EFFICIENCY OF MOTOR=T
19058 I N P U T X( URNT MORE INFORMATION "? Y E S / N O
1910 R E T U R N
1950 P R I N T EFFIC.=OUTPUT URTTS
1957 P R I N T " Y O U R RNSUER I S STILL
INCORRECT" INPUT URTTS
1956 P R I N T
1959 P R I N T " R N S U E R T O R E R C T I U E " NOU UHRTS THE RNSUER ?
1960 P R I N T " P O U E R = U * R * S I N G
1961 P R I N T
1962 P R I N T UHERE G I S THE PHRSE M w a w u ^ n
ANGLE"
1964 P R I N T EFFXC.OF MOT O R = 0 . 8
1966 P R I N T G=RCS PF=";X*180/PI;
" DEGS. " POUER FRCTOR OF MOTOR=0.8 LAG
1968 P R I N T
1970 P R I N T RERCTIUE POUER=";U;"
i " ; PI.; •• * " ; S I N ( X ) ; " = " ; I N T UR INPUT = 1200 UR.
(G+0.5)
;" VJRR . "
1974- PRINT PEE RERCTIUE POUFCLK=900 UHR.
^THfiFtPJ-aH*'
1976 I N P U T U$
1960 R E T U R N
2000 P R I N T // you can't solve the problem, the program will first offer you some
2010 P R I N T " E F F I C . = Q U T P U T URTTS" help and then, if you still can 't manage it, show you how to do it.
2020 P R I N T "
77 ZX COMPUTING FEB'MARCH 1 9 8 3 •E
SOFTWARE REVIEWS
I expect that by now you are as description hidden in caves, computer by giving it simple
sick of turkey sandwiches and
Christmas cake as I am, and are
passages, jungles, Egyptian
pyramids and the like. Just to
one or two word instructions
such as 'get keys' or 'take ABERSOFT
now on the lookout for some make matters more compli- lamp'. Using these keywords,
post festive inspiration for your cated, there are usually a you can pick up a number of
ZX Spectrum. Whether you
managed to survive the Christ-
number of monsters
mysterious objects whose sole
and items that you might think will
be of use to you at a later point
ADVENTURE1
mas period with some cash or aim in life is to hinder or help in the game; you are allowed to
you are wondering what to do you on your quest. 'hold' up to eight items.
with that fiver you received Abersoffs adventure, how- To find out what you are
from your Auntie, here are a ever, has no harmful monsters holding at any stage in the
number of goodies to choose but makes you rely on your game, you type 'inventory'; the
from. own intelligence to get around computer's recognition of voc-
the passages and utilise the ob- abulary is very good, and fast
Adventure 1 jects you find to help you win too due to the fact that the vast
— Abersoft the treasure. In the first scene,
you are looking at a water
majority of the program is writ
ten in machine code. The com
This is an adventure game, and house and you can see a large puter only scans the first four
for the uninitiated an adventure set of keys, a shiny brass lamp, letters of each keyword so 'in-
game is one of a 'search' some tasty food and a bottle of ve' is the same as 'inventory'.
usually for treasure of some water. You can instruct the To move about io the game,
SOFTWARE REVIEWS
simple compass directions There are 21 items of irea there's no resting to cook the review had a header that was
should be given such as 'N', sure to find in the game in all, odd meal or read a book or two full of rubbish, so that the nor-
'E', 'S' and ' W \ Instructions so don't expect an easy time. while you await some happen mally tolerant Spectrum re-
such as 'enter' are obeyed such The adventure holds many ing — the computer always has acted it. The whole program
that if you are next to a building secrets for the player to work a quick answer for you. For in- was littered with clicks and
or the entrance to a passage, out, one of which is the mean- stance, in the depth of frus- buzzes. However, I did manage
you will appear inside. ing of the secret messages on tration. I told the computer to load the second copy, albeit
the walls in certain rooms. I where to go' to which it pro with some difficulty.
A smashing1 game managed to work out most of mptly told me 'Watch it. The
Adventure is priced at £ 9 . 9 5
them, but I won't spoil your fun wi2ard is watching you". I
The adventure is based on a by telling you. and is available from Abersoft,
found its understanding of my
series of caves, canyon crawls 7 Maes Afallen, Bow Street,
use of 'non-Queen's English'
and passages. There are count Lack of talent? quite amusing and prompts me
Dyfed S Y 2 4 5BA.
less rooms with a white mist
lingering on the floor (similar to At one point in the game I came
to applaud the author's sense
of humour.
Superview/Super-
a Top of the Pops rehearsal, across a very strange room in One of my main criticisms of draw
maybe?). M o s t passages,
rooms, etc, are empty but some
which I was standing at a win the game is the actual quality of — video Software
dow looking down on a pit the cassettes themselves. One
will contain useful objects and (complete with mist). Opposite of the two copies I had for Video Software are now selling
treasure. The treasure varies me I could see a man at another
from extremely heavy golden window waving back at me. It
nuggets to easily breakable has been a puzzle to me ever You are s t a n d i n g at i h e end of
Ming vases. since what is the relevance road before a small, brie*,
The Ming vase had me in of the eerie figure? Perhaps he building. Around you is a
some confusion for a few days was, like me, another player forest. R smau stream flows
Idon't get the idea that you'll driven to madness by this
3ut of the b u i l d i n g and down a
g u l l y .
manage to finish this game in a game.
week'l. The problem with the I fear he might have been, as
vase is that the only way to put the game is non-graphical and i n t e r
something down is to use the requires great enthusiasm to
b command 'drop' which is
countered with the reply 'you
play for more than a few hours
You a r e i n s i d e a building, a
at a stretch. Pure text, with no <»» e I I h o u s e for a large spring.
hurled it delicately to the colour or sound, is a clear
ground'. {You have to put some waste of the ZX Spectrum's 3 b o u t y o u c a n be s e e n
of the objects down again as talent and would clearly wear ~t l a r g e s e t o f Key^
for every item of treasure you the interest of the player.
return to the water house, you (There is also a ZX81 version of
^ shiny brass lamp
receive 10 points.) So all I got the game available for £8.95.) Some tasty food
the first few times I tried this Far too often in the game, I
was a smashed vase! Until I found myself going round and bottle of water
found ihe pillow, of course... round in circles. However,
FT
/ ou can't get by the snake.
K i l l
Don't be ridiculous
JOIN
text display and creating method. First of all, the screen
system called Superview. attributes are set set to white
Superview has two options: so that the machine prints
42 pages of two colour text or white characters onto a white
2 1 pages of eight colour text. background. Then, once a
THE
These two options provide sen- whole 'invisible' page has been
sibly an optional trade-off bet- printed, the attributes are trans-
4 b OK> ween colour and space. The ferred by machine code from an
array to the attribute file. In this
only thing that disappointed me
was the waste of space in the way the text appears to in
colour storage methods. The stantly arrive on the screen.
USERS'
most space saving system This program would be very
would have been to insert col- useful to the shop owner who
our codes into the text wher- could set up some product in-
ever there was a change of INK, formation for his or her cus-
PAPER intensity and its FLASH tomers to inspect at their
CLUB
mode. Instead, they have taken leisure. Overall, I was impres-
the option to store an individual sed.
attribute for each character,
which is unnecessary. If they
had taken the more efficient op-
Luck of the draw?
tion, the storage size could
Superdraw is similar to Super-
have been doubled.
view in that it is for visual crea-
Superview is supplied on tion, but Superdraw is lor
Make the most of y o u r Spectrum or ZX81 by cassette, complete with a creating Hi-Res graphics. It too
reasonable little manual held is based around a main menu
joining the country's strongest and most
together by ring binders. Com- and uses a similar programming
enthusiastic users' c l u b - t h e National ZX Users' plementing the manual is a new style to its sister package.
Club. concept of having a written
In the drawing mode, full
commentary on the reverse
eight way cursor control «
side of the cassette. This is
W h e n you join us, we'll send you our 'new members welcome allowed along with a number ol
quite a good idea and should
pack' with 3 0 programs (15 for the Z X 8 1 , 1 5 for the Spectrum), necessary functions to alter the
clearly be an indication to other
plus the first issue of our value-packed club magazine colour, brightness, etc. Again,
manufacturers of software
INTERFACE. like Superview, there is a com-
packages requiring good docu-
mentary on the reverse side of
mentation.
Inside INTERFACE as well as at least si* programs for your the cassette and the package u
ZX81 or Spectrum, you'll find letters from members as they supplied with a ring bound
share tips and ideas, and sound off on a variety of subjects What's on the manual which provides a full
(such as you-know-who's appalling delivery times record), a menu? explanation of the system.
list of local ZX clubs, and special offers from software houses The loading problems with
and book publishers-special offers just for members. On the tape, a demo set of 21 this tape were really very
If you're having problems with your computer, we have full colour pages are provided serious. I tried to get the pro-
experts on tap to try and help you. If you want to start a local which can be loaded using gram loaded using a 'new-
users' club, we'll give you publicity, and let you buy books at a Superview's 'Load a set of fangled' graphic equaliser, but
special discount for your club members. pages by name' option. These even then failed to get it into
If you're not a club member, you're missing out on making the pages depict the history of the machine. Because of this I
most of your micro (and try saying that ten times quickly') computers and effectively am certainly not in a position to
Come on in and join us, the water's fine. It's C9 50 for a year's show off the capabilities of say whether or not you should
INTERFACE, and we'll send you a sample issue for El.00 good coloured text. buy this program. The best
Superview operates via a thing to do if you are interested
Run by Tim Hartnell, the National ZX Users' Club is a resource menu which allows you to save in this particular tape is to ar-
just waiting to be tapped Come on and start tapping, and load pages, view pages in range for some form of demon-
sequence, view pages on de- stration so that you can actu-
mand (in a similar way to Tele- ally see it loaded into the
National ZX Users' Club. text and Prestel) and to create a machine.
Dept. ZC new set of pages or alter the
44-46 Earls Court Road, existing ones. To create a new Superview and Superdraw are
London. W 8 6EJ set of pages, one must first priced £ 5 . 0 0 and are available
destroy the existing ones leav- from Video Software, Stone
OK, Tim, you've convinced me: ing room for the new set. The Lane, Kinver, Stourbridge,
pages are stored quite simply in West Midlands DY7 6EQ.
I I Send me my 'new members' welcome pack' plus my first
issue of INTER FACE and keep those INTERFACES coming
for the next year. I enclose £9.50 (UK). £1?.50 (Europe) SUPER'J IEU MENU OF O P T TONS
Purchase/sales ledger
Neil Streeter of Hastings decided to save himself
some money - instead of buying a commercial
purchase/sales ledger package, he thought
he'd write one of his own!
w ?
OPTIOMS
uper- MAKE NEW ENTRY
DELETE ENTFLY
crea- SAVE
for LIST IfcTRIES^
SAVE MLt
t too
nenu
ning
I recently became interested in the kind of format I was going to
getting hold of an accountancy store the data in. I toyed with
full package for my ZX81, especial- several ideas such as packed
)l is ly those including purchase and free, packed fixed, etc, until I
sr of sales ledger programs. decided to use a combination of
• the However, the cost of these was the first two methods I found.
lain, slightly too high for my ex- There would be two string
om- penses (I am a bit of a miser I arrays: the first would contain all
e of suppose). So, I decided to have the account names and the se-
}e is a go at writing them myself. As cond, all the data. The first array
und the prices of these programs are was easy and just needed
full in the range of £8-17, I had dimensioning. The second array
every reason to believe that this required a packed fixed format
with would be a difficult task as - packed because the data was
'ery usually the more expensive pro- packed tightly and fixed
>ro- grams reflect the complexity of because each piece of data
the programming involved. always occupies the same
but
However, I did have one number of bytes. The format for
nto
Fig 1, thing in my favour - I had each string in the array is shown
is I
studied basic accountancy while in Fig. 3.
i to
at the University of Aston in Bir-
uld AN was chosen to represent
2St
ed
r\ mingham, and I still had all my
old text books. So I rescued
the account number. This would
be a character, the code of
them from their hiding place
ar- which is the reference to the ar-
and, having dusted them off,
>n- ray of account names. VAT
looked through the indexes for a
tu- IMMT would be either the character I
j Flit NAME purchase and sales ledger.
he J or E, depending on whether it
I was amazed to find that it was to represent 'inclusive' or
would not be as difficult as I had 'exclusive'.
re
GIT NEXT first imagined. One program
Thus, having worked out my
«COUM would serve as the central core
ite format, flow diagrams and
I NO for both, with only minor altera-
>e reference material, I set to the
IENTE H AS METFT tions needed between the two.
B, NO I FILE,NAME DAE NTER FIND TOTAL task of writing a program to fulfil
TE ONLY Basically Ino pun intended), they
ANO DATA SALES.EIC my needs. It was finished after
I consist of a number of files,,
approximately seven hours
each containing information on a
work.
sale or a purchase. At certain
POINT The program is quite
TOTALS times, these accounts would
straightforward to use and has
have to be balanced and up-
space for 50 accounts and up to
dated.
3 0 0 entries. If you have less ac-
First things first though - I counts you may alter the arrays
decided to draw up a series of to suit your requirements. The
flow charts to simulate exactly program listing as it stands is for
what the final program should the purchase ledger, but only six
do. These are shown in Figs. 1 lines need be altered to magical-
and 2. ly transform it into a sales
ledger. Two programs for the
Setting up price of one - pretty good, eh?
Fig. 2 Then, I set about the programm- I'm not saying that this pro-i
•E
ing. My first decision involved gram is as good as a commercial |
81 ZX COMPUTING FEB'MARCH 1 9 8 3
ZX81 DOMESTIC
2120 IF INKEY $ < > " " THEN GOTO 212
0
2130 LET F $ = INKEY $
M AN OAK AMOUNT REFERtlMCf < 2140 IF F $ <> " I" AND F $ < : > " E " THEN
>
1
GOTO 2130
I 11 6 1 2150 PRINT , , " U . A . T . "J"INCLUSIU
> AND F j = " I " j " E X C L U S I V E " A N D FS
NUMBER OF BYTES = " E"
Fig. 3. The format for each string in the array 2160 PRINT .. I S ENTRY CORRECT?
(YES OR NO} ? "
2170 IF INKEY$<>"" T H E N G O T O 317
package, but it does do the job as a direct command. Follow 0
and it's fairly fast too. Which this with GOTO 1 0 0 0 as a 2180 LET Gt=INKEY$
may present a moral - just direct command. 2185 IF G$="N" THEN CLS
because the price is high, it You will now be requested 2190 IF G$-"N" T H E N GOTO 24 10
doesn't mean you can't write it to enter the date again which 2200 IF G$="Y" T H E N GOTO 22P0
yourself. you should do and you will get 2210 GOTO 21SC
the menu. You may now select rOR -< = 1 T O NA
Operation the SAVE option and save the 2230
GOTO
IF A l t y ,
2280
TO LEN E£; - F i THEN
program either as a sales ledger
The program, like all good 224-0 NEXT X
business programs, is menu or as a purchase ledger. This 2 2 5 0 L E T NA = N A + 1
driven and extremely user means that your program will 2260 IF NA > 5 0 T H E N G O T O 2470
friendly. It should be evident automatically start on loading 2265 LET X=NA
how to use the program as soon with the first date as 0 0 : 0 0 : 0 0 . 2270 L E T A $ <X)
as you have it up and running. 2280 LET AC =AC 1
However, when I set it up 2285 IF AC T H E N GOTO 2470
for the first time, I do the follow-
2 ^ 2 L E T 5 $ ( A C . 1 ) - C " H R $ >:
-'300 LET 5 $ 'AC., 2 T O 9 ) = D $ >2)
ing. RUN the program, which References 2 3 1 0 ' L E T 6 $ f AC . . 1 0 T O £ 0 ) - S T R $
should give you a date request 2320 LET 5 $ (AC ..21 TO 26>=R$
on the screen. Then, EDIT and Business Accounting 1 and 2 - 2:330 L E T 6$ (AC, 2 7 ) = F $
STOP, followed by Newline to Frank Wood, published by 2340 CLS
break into the program. Now, Longman. 2350 PRINT "ACCOUNT ENTERED."
enter: Framework of Accountancy - 2360 PRINT . . A $ (CODE E$(AC)>
CC Magee, published by Mac- 2370 PRINT , l AC, 2 TO 3 6
LET DS(I) = " 0 0 : 0 0 : 0 0 " Donald and Evans. . 1 0 TO 20)
2380 PRINT , , " R E F : " ; B $ t A C , 2 1 TO
2
Its l> I H *5tJ.,2(3) 2385 LET U=0
3 C D I M 1 3 0 3 , 2 7 ) 2390 PRINT "UAT. £",
3 0 D I M 6 ( 5 0 t 3 J 24-00 I F 6 $ (AC , 2 7 ) =" I " T H E N LET V
4-0 D I M D $ ( 2 , 8 > =UAL B $ ( A C , 1 0 TO 20)^100*15
5 0 L E T N f l = 0 2405 PRINT U
5 0 L E T fiC=0 2410 PRINT , /'OPTIONS:
1 0 0 0 C L S ^4.20 P R I N T E N T E R A N O T H E R fl
1 0 1 0 P R I N T " E N T E R D R T E R S : - ( D D / CCOUNT.","2, RETURN TO MENU."
'-iM/YYi " 24-30 I F I N K E Y $ < > " " T H E N G O T O 243
I N P U T E $ .- * •
I 0 Q 0 I P L E N T H E N G O T O 1 0 3 0 2440 Ir I N K E Y $ = " " T H E N G O T O 244C
104-i:'. L E T D $ < 2 ) = E $ 24 50 IF INKEY $ = " 1 " T H E N G O T O 200
105 3 • = •Tk
HOW DARE
L / \ UI
from
J.K. GREYE SOFTWARE LTD
THEY!
t i j c n o i c riurnQTiniM r n r r i i n n r urn i r r
11 II- I ILUI ULI H-I\l 11 IUI I _"_'/ I Ufl ll\L I /'_"_'_"_
y
Without question the finest machine code games available
today::. J.N. ROWLAND Product Manager (or W.H. SMITH.
• READERS •
rhe ZxST then J K Greve'j 3D MO\ST(R MAJt mute tie the one without doubt'
IX COMPUTING "finftwr. fn*,vir.6nifc*nr'" POPULAR COMPUTING WEIKL Y
ZX
all time favourite with an added tw--st See how much Money
you can win and watch the pounds convert to Doftars All
in Mach-ne Code tor Fast Action with 3 Speeds 2 Bat S.rrs
and th/er angles of rebound' The best BREAKOUT around
and at this price you can't go wrong'
• The ben ot its hind' iVWCH MICRO & SOP TWAft£flEVIE W
COMPUTING
GAMES M A R K E D • INCL MACHINE CODE.
Prices include VAT and U.K. P. & P
I Add appropriate Postage on Foreign Orders). Cheques/P O.s to
Britain's Biggest Magazine
J.K. GREYE SOFTWARE LTD for the Sinclair User.
Depi 16, Brendan Close, Oldland Common. Bristol BS15 6QE
CREDIT C A R D SALES: FOR INSTANT DESPATCH. BY P H O N E ONLY
PHONE
TEL; 01 930-9232 (9 a m • 7 pirn
BRIDGETTE ON
It you prefer to see before buying, our range Of GAMESTAPES
01-437 1002
are stocked by the lollowmg stores
BUFFER M I C R O S H O P 374A Streatham H.gh Rd London SWt6
GAMER Gloucester Rd Brighton,
GEORGES 89 Par* St Bristol. Avon,
FOR DETAILS
MICROSTYLE 29 Belvedere. Lansdown Rd .Bath Avon,
MICROWARE 131 Menon Rd Le-ce9ier,
SCREEN SCENE 144 St Georges Hd , Cheltenham, Glos,
W M SMITH Over 200 Computer Branches,
ZEDXTRA S School Lane. Kinson, Bournemouth Dorset
TRADE & EXPORT ENQUIRIES WELCOME
prime integers
and if the above is found to be
true, then ihe next N is formed
and the testing resumed.
Idl The pnmality of the tested
number is detected by limiting
the value of D to a maximum
equal to the square root of N. If
no divisor is found up to this
value, then N is prime. Steps are
taken to count and record (if
desired) the prime so found, and
then the next number for trial is
formed and tested for pnmality
or compositeness.
A program devised to do this
is given in Fig. 4. The work stops
when N is greater than the upper
bound of the chosen region.
Typical results are printed out in
Fig. 4a and fuller results are
tabulated in Table 1
A new region is then chosen,
Edgar Pulsford b s c , c e , m i e r e , typically one decade greater,
and the work continued. Be
uses his ZX81 to tell you everything cause of the slowness of the
testing when N is large, say
you ever wanted to know about greater than 10" , it is conve-
nient to reduce the number of
prime integers . . . but were afraid to ask. primes counted at any particular
decade, and to accept a worsen
A computer is programmed to P Number of primes in the each region, and relating this to ing of statistical accuracy.
identify and count the primes in range. the magnitude of the central in
a range of conseculive integers
centred on a power of 10. eg
R Proportion (or density*
of primes P W.
tcgei. For example, in the region Treatment of
5 0 0 to 1 , 5 0 0 . 144 primes
Irom 9.500 lo 10,500. The In N Natural logarithm ol N. were found. The proportion is
results
proportion of pr imes in I he range therefore 144 1 , 0 0 0 or 0 . 1 4 4 , As the observations were made
is calculated for each decade The empirical result in symbols which was related lo 1,000, the on regions one decade apart, it
from lOto 10". can be seen in the equation central integer between 5 0 0 seemed convenient to plot
If the proportion of primes in below and 1 , 0 0 0 A measurement of (manually) R against log. N
the mteyers of the range is term- this kind was made, using the Figure 5 is the result. Although
ed the density of primes, then it R k InN 1 program of Fig. 4, at each at first, the base 10 was used,
is found that: decade from 10 to 10', which is later it became apparent that the
Counting of primes about as far as the ZX81 will natural base, e, was to be pre-
The product of the density of conveniently qo. ferred. The plot of R against In N
primes and the natural logarithm This work was prompted by a The principles involved are: is therefore shown.
of the central integer uf the program published in ZX Com (al Integers of the series 6 M 1 The shape of this curve
range appears to he unity. putmg. Vol. 1, No. 1, page 29, are chosen for testing. It may be prompted examination to see if
which program was modified to seen that this series contains all it were an exponential or a rec
or: give a serial number to each the primes, although all numbers tangular hyperbola. It was soon
prime. This proved to be the im- of this series are not primes. found that it was a good fit to
The mean spacing of primes portant factor for what follows Seeing that and 6 M j _ 3 the equation:
about N equals hge N. resulting in the primes being represent all the odd integers
considered as a definite class of (but 6 M i _ 3 are composite, be X x Y is a near constant
These results have irregularities integers, little notice being taken ing divisible by 3) it follows that
because of the non-uniform of their values. The study 1 contains all the integers If ihe product of R and In N are
spacing ol the primes. Also, the became one of the density of which might be primes. formed, it is seen that they are
number of integers in the range primes in the integers, par The program starts with a not only near constant, but that
is small compared to the ticularly with relation to the posi trial integer of the form 6 M 1 'constant is near unity. Thus, the
magnitude of the central in tion in the integers where the near the lower bound of ihe empirical relation:
teger, and yet large enough to density was measured. region of interest, lests it. adds
reduce statistical errors to minor The modified program refer- two, lests the number so form R x in N 1 (approximatelyI
importance red to is given in Fig. 1. Figure 2 ed, then adds four and tests
All integers are positive, and gives I he result of printing out that, and so on, counting the is obtained, where N extends
primes are those with no faclors every hundredth prime, and ;ilso primes as they are found over the range from 10 to 10'
other than themselves and shows the ratio of the prime to (b) The divisors ID) used for the This result has the quality of
unity The principal symbols in its serial number. Figure 3 tests start at three, and each being mathematically simple,
volved with the density of prime shows a graph of this ratio time a new divisor is needed, which is satisfying. But it is
utegers are given below. against its serial number. The two is added to ihe D just used possible to go a slage further. R
shape of this curve has not been so that all the odd integers are x In N may be written:
X - Lower bound of range. studied, but the fact that it was a used in turn. There is no point in
Y- Upper bound of range. smooth curve indicated that using even integers. In Nf1 or In Itf' w
W - Width of range there was some relationship (c) The composite nature of the
IX Y> consecutive worthy of further investigation. number under test is detected and either of these equivalent
integers. It was then decided to study by: expressions may be equated to
N- Central integer of the small regions of the integers, fin- unity lapproxl. ^
•E
range = ( X - Y ) 2. ding the proportion of primes in 5 5 0 IF N D INTIN D) 0. etc And since the number whose ^
85 ZX COMPUTING FEB'MARCH 1 9 8 3
ZX81—EDUCATION
natural logarithm is unity is e, or used to calculate the number of
exp, it is possible to write: primes expected and to com
pare the results with 100. This
(sfw ^ e
was done and is shown in the
results of Ihe program in Fig. 7.
where e is equal to 2.718 The results are fairly consistent
with expectations, but this is
Statement of the only a small range over which to
do the test. The figures are in
result eluded for interest; their mean is
If there are P primes in a region 1 0 0 . 8 . It rsconsidered that they
W of the natural integers of support the empirical relation-
TO
37,4
which the central integer is N. ship.
then, if R - P W ,
various
R x In N - 1 or N 4 '« e
observations
The accuracy and 'constancy'
The program of Fig. 4 is so
of R x In N is shown in Table 1.
designed that it is essential that
The effects of the statistics of
the first integer in the range W
sampling have been laken into
offered for test is of ihe form
a c c o u n t only insofar as a
6M 1 To ensure this, when
reasonable sample size for P has
the value X of ihe lower bound
been aimed at, consistent with
has been found, the starting in
the time available for the work.
teger for the test, X , is found
using:
Testing the
relationship X' 6 x INT (X/6)
INT (X 6) gives the value of M,
Having made the observations and then theexpressrongivesan
and developed the relationship, integer which is a few units only
it remains to test it to see if it can away from the value of the
be used to forecast new infor lower bound, X
mation. The value of the upper
A test program was written bound, V, is used without
in which a series of Ns from 3.2 modification for ending ihe
x 1 0 to 3 2 x 1CT were chosen. search.
These may be thought of as the For the larger Ns the com
half points of decades because puting takes a long time, even in
log 3.2 is about 0 . 5 . For each of Fast m o d e . R e d u c i n g the
these Ns, the value of W which number of primes has been used
was expected to contain 75 to shorten the work but con-
primes was calculated and the tinuous running day and night
computer set to count the actual has been neccessary. If the N u 3 2 0
number in this W , the result be scope of this work is to be ex P = 75
mg compared to the expecta tended, a faster working and U = <132
tion. The program and results larger number-handling com L I M I T S 104 TO 5 3 6
are given in Fig. 6 and Table 2 puter will be needed.
S E R R C H FROM 1 0 1 T O 536
(test results). It will be seen thai The region about 10 pro-
there is a good agreemeni bet
RT N TMERE RRE 7 1 P R I M E S \M
duced anomalies, suggesting HERE 75 UERE EXPECTED
ween measurement and expec that there is a scarcity of primes
tat ion. there. This needs looking into. It * * T * * * +* i * *»1
Material for lests is also is known that there are regions
found in the results of the first where Ihere are long succes- N = 3200
experiment. Figs. 1 and 2. The sions of composites (see text P - 75
U = 6 0 5
empirical relationship can be books on Theory of Numbers)
L I M I T S 28S£- o 35S£
S E R R C H FROM Z3=>? TO 3503
PW
N
<^T N = 3 2 0 0 T H E R E P R E 7 1 PRIMES!
N w P R = P/W In N R x I n N e = 2.718 JHERE 7 5 UERE EXPECTEI?
RT N - 3 2 O 0 O O O T H E R E RRE 8 5 PRIM Fig 1 The modified program to give a serial number to each prime
£S UHERE 7 5 WERE E X P E C T E D
fti f + * * * * * * + * * S E R I A L PR I M E R P T I O P / S
* a 3 2 0 0 0 0 0 0 10O
P a 75 54-1 5 . 4 1
2 0 0 1 2 2 3 6 . 1 2
'J = 1296
3 0 O 1 9 3 7 6 . 6 2
LIMITS 3 1 9 9 9 3 5 2 T O 32000646 4 0 0 2 7 4 1 6 . 8 5
SEARCH FROM 3 1 9 9 9 3 4 9 T O 3200054
a 5 0 0
6 0 P
3 5 7 1 7
7
. 1 4
. 3 5
7 0 0 5 2 7 9 7 . 5 4
AT N • 3 2 O 0 0 0 0 0 T H E R E R R E 7 3 PRI
1ES UHERE 7 5 U E R E E X P E C T E D 8 0 0 6 1 3 3 7 . 6 7
9 0 O 6 9 9 7 7 . 7 7
1O0O 7 9 1 9 7 . 9 2
• *** * * * * * * * * * * * * * 1 1 0 0 8 3 3 1 8 . 0 3
1 2 0 0 9 7 3 3
N * 320000000 8 . 1 1
3 = 75
1 3 0© 1 OSS 7 3 . 2
14 0 0 1 1 5 5 7 8 . 3 3
U = 1468 150G> 1 2 5 5 3 3 . 3 7
LIMITS 3 1 9 9 9 9 2 7 0 TO 320000730 1 6 0 0 1 3 4 9 9 3 . 4 4
SEARCH FROM 3 1 9 9 9 9 2 7 0 T O 320000 1 7 0 0 14 5 19 3 . 34
730 1 8 0 0 154.01 e . 5 6
AT N - 3 2 0 0 0 0 0 0 0 T H E R E R R E 7 3 PR 1 9 0 0 1 6 3 8 1 8 . 6 2
IMES UHERE 7 5 U E R E E X P E C T E D 2 0 0 O 1 7 3 3 9 8 . 6 9
Fig. 2. The result of printing out every hundredth prime and the
***** * * * * * * * * * * * * ratio. Ft
87 ZX COMPUTING FEB'MARCH 1 9 8 3 •E
12X81—EDUCATION1
5 2 0 LET C=1
5 3 0 LET D =3
540 SCROLL
- « t -*- 550 IF N/D-INT ( N / D ) = 0 T H E N GOT
0 630
5 6 0 I F D > SQR N T H E N G O T O tCC
570 LET D=D+2
5 8 0 GOTO 550
6 0 0 P R I N T TAB 5 , S , T A B 12;N
R 6 1 0 LET S=S+1
6 2 0 LET C=C+1
630 I F C > 2 T H E N GOTO 660
6 4 0 LET N = N +2
-
6 5 0 GOTO 530
1k 2k 660 SCROLL
©70 PRINT TAB 5 ; " * "
S ©30 LET N=N+4
690 I F N > U T H E N GOTO 705
RATIO P/S
7 0 0 GOTO 510
"705 SLOU
710 SCROLL
720HPRINT " C E N T R E OF R A N G E , N =|
" ; < AN+UN) / 2
730 SCROLL
740 PRINT "RANGE , U = " ; (UN-ANi
750 SCROLL
769 PRINT "NO. OF P R I M E S . P ="
S - l
770 SCROLL
780 PRINT " P R O P * N OF PRIMES,R
" ; ( S - 1) / C U N - A N 1
790 SCROLL
800 PRINT " N A T * L L O G N , L N N ="
LN ( ( A N + U N ) /"21
SE.PIAL NO
810 SCROLL
820 PRINT " P R O D U C T , R X L N N ="|
1 ( < S - 1 ) X (UN — AN J ) * L N I i A N + U N ) / 2 )
830 SCROLL
Fig 3. The top graph shows what the relationship between R and its 835 SCROLL
serial number should be The bottom graph shows the actual printout 840 PRINT "TABULATE IN URTTING"
845 SCROLL
846 SCROLL
1 0 REM " P P 4 " 850 PRINT " P R E S S C TO C O N T I N U E , |
ee PRINT " * * T H I S PROGRAM GIUES 86015CROLL I
P R I M E S RND S E R I A L N U M B E R S BETUE 870 PRINT BREAK"" THEN ""NEU!
EN S P E C I F I E D LIMITS**" LINE"" FOR PROG."
25 PRINT "FOR L I M I T S PRESS ""S 6S0 IF I N K E Y $ = " " T H E N GOTO 8 8 0
TOP"" AND " " N E U L I N E " " TUICE. CON 890 IF INKEY 4 = " C " THEN CLS
TINUE UITH "•'RUN"" AND " " N E U L I N E 9 0 ® GOTO 2 0
1 0 0 0 SAUE "PPQ"
" 3 0 REM * *L OUER LIMITS** 1 0 1 0 GOTO 2 0
100 LET A2=47
110 LET 0 3 = 4 9 7 Fig 4 A program to find the proportion of primes in a particular
120 LET A4=9497 region, relating the result to the magnitude of the central integer.
130 LET A 5 = 9 9 4 9 7
14.0 L E T A 6 = 9 9 9 4 9 7
1 5 0 L E T A7 =99994-97 *
150 LET A6 = 9 Q 9 9 Q 8 Q 9 108 104.
17Q L E T H 9 = 9 9 9 9 9 9 S 9 9 1
180 REM * ( U P P E R LIMITS** * 09 10501
200 L E T U 2 = 1 5 3 C E N T R E OF R A N G E , N =10000
2 10 L E T U 3 = 1 5 0 3 RANGE, U =1006
220 L E T U4 = 1 0 5 0 3 NO. OF P R I M E S . P =109
2 3 0 L E T U5 = 1 0 0 5 0 3 PROP" N OF P R I M E S , R =0.10834.99
240®LET U6=1000503 NAT* L LOG N . L N N =9.2103404
250 LET U7=10000503 PRODUCT, R X LN N =0.99793946
260 LET U8 = 1 0 0 0 0 0 1 0 1
270 LET U 9 = 1 0 0 0 0 0 0 1 0 1 TABULATE IN URITING
280 P R I N T " I N P U T LOUER L I M I T AS
" " " ••
RRESS C TO CONTINUE, OR
290 INPUT AN "BREAK" THEN "NEULINE FOR PROG,
400 L E T N =AN *
4 10 PRINT "INPUT UPPER LIMIT AS
" " U N " " " 59 9000499
420 INPUT UN
4 3 0 LET U=UN CENTRE OF R A N G E , N =9000000
440 PRINT N , " TO U; DIFF . = RANGE, U =998
; U-N NO. OF P R I M E S . P =59
450 LET S=1 P R O P " N OF P R I M E S , R =.059118237
470 PRINT "PRESS TO PROCEED. N A T " L LOG N , L N N =16.012735
PROGRESS MAY B E S E E N BY PRESSING PRODUCT, R X LN N =0.94664466
""BREAK"". CONTINUE UITH C A
ND NEULINE" TABULATE IN URITING
4B0 IF I N K E Y $ = " " T H E N GOTO 48© P R E S S C TO C O N T I N U E , OR
490 IF I N K E Y $ = " C " T H E N GOTO 500 " B R E A K " THEN " N E U L I N E " FOR PROG.
500 CLS
510 FAST Fig 4a Typical results from the program given in Fig 4
•E
expected and to compare the results with 100
89 ZX COMPUTING FEB'MARCH 1 9 8 3
Push your Sinclair to the limit
ZX81/SPECTRUM UTILITIES
TOOLKIT
ARCADE GAMES Nine powerful new (unctions for
your ZX81 (including re-nurntjer
** GAMES ^C
lines Igoto. gosubi. program merge. INCA CURSE
— Z X INVASION FORCE String finding and replacement £5 95 (Adventure B
In a lungle clearing
SPEC BUG you come across an
Use your skill to fire through A 30 m i machine code loot and disassembler ancient Inca temple
the energy band to destroy tor your ZX Spectrum £6.95 s p e c j w " . Your mission to
the m e n a c i n g alien ship — ZX BUG enter, collect the
£3.95 A 30 in i machine code tool and disassembler treasure and escape
lor your ZX81 £6.95 alive But beware1
SPEC I N V A D E R S Includes a cassette save routine £6.00
WV-Y---- SPEC G O B B L E M A N
SHIP OF DOOM (AdventureC)
\,v*!^00^ T h e s e exciting high-
s p e e d classic g a m e s
Improve your machine You are unavoidably drawn to an alien cruiser
incorporate hi-resolutiongraphics a n d code programs with this Can you reach ihe control room and free
yourself Or will they gel you first' Includes
new 48K Spectrum
s o u n d to bring you the best in a r c a d e
a cassette save routine £7,00
action at only £4.95 e a c h (16'48K)
ESPIONAGE ISLAND Adveni0r«t>i
SPEC FROG 5 / S H 0 W D 0 W N Assembler While on a reconnaisance mission your plane
Just released by Artie. this new professional loses control and you are forced lo land
^ ^ w j L I - H o p a c r o s s the d a n g e r o u s duality assembler is also available for 16K Can you survive and escape with the island s
road avoiding the lethal cars, ZX81 and features — hidden secret' £8.00
t h e n lorries. G o back to the * Word-processor like lent editor * High PLANET OF DEATH :ADVEM„RE A 16'48K
wild west for a gunfrght battle a m o n g s t speed versatile two-pass mnemonic You lind yourself stranded on an inhabited
cacti a n d w a g o n s F e a t u r e s include assemble' with labe's and detailed error- alien planet Can you reach your ship and
w e s t e r n m u s i c £4.95 trapping Will assemble to any address escape9 £5.00
* Essential support facilities such as
N A M T I R R A I D E R S < ZX81)
High speed, quick action
memory edit, register mspect,'modify and
search for de bugging • Full output to
R E D U C E D TO ZX FORTH
arcade g a m e w i t h four ZX-printe? • Memory-status Supplied on cassette
separate groups of attackers report and comprehensive „ r"Q nrr ' with editor cassette
£3.95 user manual UNLY l - i J . i J D user manuals and keyboard overlay ZX Forth
combines the simplicity of basic with the
Goobleman also avaiiab'e tor a; £3 95
ZX81& SPECTRUM speed ol machine code
jj
Cheque for totai amount enclosed
Name
Address
396 JAMES RECKITT AVENUE,
HULL, N. HUMBERSIDE, ZX}
90 ZX C O M P U T I N G FEB/MAR 1983
PROGRAMMING SKILLS
do with ik
to gather together all the possi-
ble space saving techniques I
could think of into one place, for
permanent reference. Here,
then, in no particular order, is a
complete list of memory saving
tricks' for use with your IK
ZX81.
Some of these techniques
are very obvious, and are
presented without explanation;
others are illustrated in the sam-
ple programs. Some are mutual-
ly exclusive (if you use one, you
may not be able to use another)
and some appear to 'supersede'
others (they achieve the same
object, but more efficiently).
The actual amount of memory
saved, and which of the techni-
ques is 'best', will depend on the
You may context in which you use them.
memory is names.
2. Re-use variables as often as
program efficiently.
10 INPUT X
20 LET S • SQR X
3 0 PRINT "THE SQUARE
ROOT OF " ; X ; " IS S
There has been a tendancy of grammers take pride in their
late for computer memory sizes What's in store? work (and it is difficult to be pro- and here is the 'improved',
to go literally 'through the roof'. If you are still working with 1K, ud of something which is ineffi- shortened version:
In olden days (and remember you may well get the impression cient), consider the following
that in computer terms, the that you are becoming a 'second situation. You have a 16K RAM 1 0 INPUT X
'olden days' were only two or class citizen' in the computer Pack, and have been writing 20 PRINT "THE SQUARE
three years ago!), the largest world! Is there any point in even programs for months without ROOT OF " ; X ; " IS ";SQR X
possible memory size for an trying to squeeze in anything any memory problems. One
eight-bit microcomputer was worthwhile, or should you join day, you decide to write a 4. Remember that loop-control
64K. Only a very few exclusive- the rest in the Great RAM Race? database routine, the first line of variables take up more room
ly business machines actually The answer, ( firmly believe, which is; than simple variables. Either
achieved this maximum; the is yes, you should persevere, avoid using FOR . . . TO loops or
largest PET was 32K, the Apple and no, you should not expand, 10 DIM A $ ( 1 0 0 , 10,15) use the same loop control
was 48K and the Sinclair ZX80 until you have learnt how to variable for every loop in the pro-
was (theoretically) expandable make the most of every single gram.
up to 16K, although many one of your 1,024 bytes. Let's Panic! Anything you try to add 5. Avoid using numbers! The
ZX80 users either did not ex- face it, most people buy a ZX81 produces the notorious 'error ZX81 uses bytes to store a
pand beyond 1K at all, or were to learn about computing, and code 4', so you reduce the single digit number (or eight
content with the smaller 4K there are lessons to be learnt number of data items from 100 bytes for two digits, etc). Any of
RAM extension. But look at the about efficient and concise pro- to 90, and then to 80. Eventual- the following techniques may be
situation today - the latest gramming which even the so- ly, you find you have created the more economical:
'Superpet' is available with called experts have never realis- world's smallest database! a) If a number is going to be us-
256K of RAM; the Sinclair ed. Computer programs are like Now, massive multi- ed several times, assign a
Spectrum can have 48K 'on gases - they tend to expand to dimensional arrays are not the variable to that number.
board' as standard; even the fill the amount of space available sort of thing which beginners b) Use previously assigned
'small' Spectrum is as large as to them (Valentine's first law!). use very frequently, but look at variables. For example,
the 'fully expanded' ZX81 If you have got 64K, then you any professionally written pro-
(16K). And the ZX81 itself? will use it, all of it, even for the grams (certainly in the business 10 LET A = 1
Well, there is the 64K simplest of problems. And for field, but games and graphics 2 0 LET B - A
'Memopack', and I believe anything complex, well, you'll programs as well), and you will 3 0 LET C = A
(although I haven't actually seen lust have to look around for that see that they are extremely
this personally) there is a 1 28K 128K RAM pack! common. You are going to have will initialise all three variables
RAM extension on the market.
Does this matter? If larger to use them one day, and if you although only one number is us-
Sinclair's own 16K RAM Pack
memories are available, is there haven't learnt how to squeeze ed.
has been reduced in price, and
any point in writing efficiently? programs into a small amount of c) Use VAL. The expression LET
any number of alternative 16K
There certainly is! Apart from space by then, you are going to^ A = VAL "200" is more ^
RAMs are now available.
the obvious fact that most pro- have problems! economical than LET A - 2 0 0 . ^
Mastering machine
code on your spectrum
part 3 world. One way is via the key
board. It can receive informal
tion from the keyboard using I
instructions as shown in th
table on the page opposite. Tfi
number you actually get frc
Continuing her series on such an IN instruction is be
viewed in binary. Each such INI
machine code, Toni instruction tests five specific!
keys on the keyboard, and for]
Baker, author of each key produces a 1 if th
key is not pressed and a 0 if th
'Mastering Machine Code key is pressed. Bits 7, 6 and 5|
will contain rubbish, bits 4, 31
on your ZX81', shows 2, 1 and O test the keys in thJ
order given above. For m-i
you how to use your stance, suppose keys Symb
Shift and B were held down]
programming skills simultaneously, then I N
r,(7FFE) would produce the
write a small, but (binary) number xxxOllOlJ
The zeroes indicate that a key is
efficient, program. pressed. The xs are rubbish anfi
their value is unimportant. You
can achieve this test in two
ways: either LD BC.7FFE.INI
r,(C) or LD A.7F/IN A.(FE). See
if you can deduce why both of
these are equivalent to "IV[
r,(7FFE)".
Another way of com-
municating with the outside I
world is via the television I
screen - this is an outpul\
device (the keyboard is an input |
device). The contents of the j
screen itself are controlled by
addresses in memory (4000 to
5AFF), but the colour of the
BORDER is actually changed by
an OUT instruction.Try typing
(in BASIC) OUT 254,6 and see
In this article I shall introduce tions: IN and OUT. Both of really just a shorthand notation what happens. Now press
you to a few simple machine these have equivalents in Spec- — what it really means is IN Enter on its own. What's hap-
code instructions and use them trum BASIC {although not in D,(BC). Also note that in the pening is that the ROM itself a
to write a short but very, very ZX81 BASIC) but most people above table, A is a register and re-setting the border colour
impressive program. have absolutely no idea how to n is a fixed constant. Now let's (with its own OUT instruction)
The first two of these in- use them. In BASIC, they are in get down to what these state- to whatever number is given by
structions are CALL and RET. a sense similar to PEEK and ments actually do. the system variable BORDCR.
RET you've seen before — it is POKE, and so in machine code Try typing POKE 23624,6 * fr
used to end a machine code there is a certain similarity bet- What's it all and see what happens. Now
program in order to RETurn to ween IN and OUT, and LD about? press Enter on its own.
BASIC, but it also has another r,(pq) and LD (pq),r (r means IN fetches a number from the The instruction, OUT
use. CALL and RET in machine any eight-bit register, and pq outside world and loads this (xxFE),r, in any form {wherethe
code are quite similar to means any address). Let's first number into a machine code xx can be any byte whatsoever
GOSUB and RETURN in BASIC. look at the formats of these register. OUT takes a number — its value is irrelevant), will in-
CALL is used to enter a statements as shown below. from a machine code register stantly change the border col-
subroutine, and RET will exit Notice that the standard op- and sends it to the outside our to the colour whose code is
the subroutine and move con- codes are incomplete. For in- world. There are a number of contained in the register given.
trol back to the instruction im- stance, there is an instruction ways in which the Z80 chip can For example, LD A,0210
mediately after the CALL in- called IN D,<C); however, this is communicate with the outside C,FE/OUT (C),A will change the
struction. Instead of a line border colour to red. Notice
number you have an address, that we do not need to worry
Machine Code Short For Basic Equivalent
so CALL pq means 'GOSUB ad- about the B register because in
dress pq' - not 'GOSUB line IN A,{n) IN A,{An) LET A = IN {256 * A + n) this particular case its value is
pq'. In machine code, remem- IN r,(C) IN r,(BC) LET r = IN {256 * B + C) unimportant. This is a side-
ber, there are no line numbers. OUT (n),A OUT (An),A OUT 256 * A + n,A effect of the Spectrum hard-
And now for some more ex- OUT (C),r OUT (BC),r OUT 256 * B + C,r ware, not of machine code
citing machine code instruc- itself.
94
MACHINE CODE
meanings; for instance, FE can learned far more machine code
IN r.(FEFE) scans section 0: V, C, X. Z and Caps Shift mean either 2 5 4 or minus two. from ironing out the bugs in my
IN r,(FDFEl scans section 1: G, F, D, S and A Now, 2 5 4 divided by two is programs than they have from
1 27 (in Hex 7F) whereas minus the ones which worked, and
IN r,(FBFE) scans section 2: T, R, E, W and Q
two divided by two is minus actually wondered if the bugs
IN r,(F7FE> scans section 3: 5, 4. 3, 2 and 1
one (in Hex FF) — so there were put there deliberately! (I
IN r,(EFFE) scans section 4: 6, 7, 8, 9 and O
must be a simple way to over confess they weren't — this
IN r.lDFFE) scans section 5: Y, U, I. 0 and P
come this problem. There are brilliant teaching method oc-
IN r,(BFFE) scans section 6: H, J, K, L and Enter
two different Shift Right in curs purely as a consequence
In r,(7FFE) scans section 7: B, N, M, Symbol Shift and
structions, called SRA and SRL. of typing errors and the like!).
Space
SRA (Shift Right Arithmetic)
However, there is one last
treats numbers between 80
technique by which to learn
and FF as negative and divides
All change less to 8 0 or more, or if the them by two. Its precise effect
machine code, and that is to
write it yourself. You take a
number decreases from 80 or is to move each bit one position
To change tact completely I more to 7F or less — for non- scrap of paper and scribble
to the right, with the rightmost
would like to introduce you to a arithmetic instructions it is set down a few ideas, turn the
bit moving into the carry, and
new set of instructions to 1 if the result contains an ideas into some sort of
the leftmost bit remaining
altogether - the ROTATE and even number of ones, or zero if coherent pattern of how you
unchanged (bit 6 and bit 7 are
SHIFT instructions. In order to it contains an odd number of think it ought to work (either
always identical immediately
understand the effect of these ones. with or without a flow diagram
after a SRA instruction). SRL
instructions it is useful to think What is the point of the flag - it doesn't matter), elaborate
(Shift Right Logical) treats
of the numbers involved in P? Its non-arithmetic use (parity it into a program or part of a
numbers between 8 0 and FF as
binary rather than Hex 'useful, check) is absolutely useless as program, turn it into Hex, feed
positive and divides them by
although not necessary). Sup- far as I can see. Its arithmetic it in, watch it crash, turn around
two. Its precise effect is to
pose A contains the number use (overflow check) comes in- three times, jump up and down,
move each bit one position to
00101101, and the carry flag to play when you're doing and sing the National Anthem
the right, with the rightmost bit
iwhich I shall refer to as K) con sums. It assumes that numbers wondering why it went wrong!
moving into the carry, and the
tains the number 1. The in- 8 0 to FF are all negative (FF be- leftmost bit becoming zero.
struction RLA (which stands for ing minus one, FE being minus
There is one more instruc-
Rotate Left A| will rotate every
bit one position to the left. The
two, and so on), and so since
4 2 (positive) plus 4 2 (positive)
tion I need to give you before Crash landing
the program will make sense
leftmost bit of A moves into K, equals 84 (negative?) we
the instruction HALT. HALT in
which itself moves into the have an overflow!
machine code is quite similar to Programs go wrong all the
rightmost position of A. In the Back to the ROTATE instruc- time as you're writing them,
PAUSE 1 in BASIC. Its precise
example given, the result would tions. As well as RL and RR, especially in machine code. The
effect is to wait (for a maxi-
be that A contained the number there is another breed of rotate difference is that in machine
mum of 1 / 5 0 t h of a second)
0101101 1 and K would now instructions - RLC and RRC, code a crash is usually fairly
until the next TV frame has
be zero. On the other hand, if which stand for Rotate Left (or fatal, sometimes even meaning
been output to the screen, and
RRA were used instead of RLA Right) without Carry. If A that you have to actually
then to continue from the next
(guess what RRA stands for!) started off as 0 0 1 0 1 101, then switch the machine off before it
instruction. Its use. as I have
then A would contain irrespective of the original value will behave sensibly. (The
made use of it, is in synchro-
10010110 and K would con- of the carry, RLCA would Spectrum usually behaves quite
nisation — avoiding that horrid
tain 1. You can do the same for change it to 0 1 0 1 1 0 1 0 and sensibly when it's switched
jump you sometimes get when
any register except that the in- RRCA would change it to off.) All I'm really trying to say
you change border colours half-
structions are written.different 1 0 0 1 0 1 1 0 . K would, in fact, is that when this happens
way through the screen out-
ly - you write 'RL B' (with a be changed its new value (note: when, not if) that you
putting.
space) instead of 'RLB' would be the bit which came shouldn't be too disheartened
The program J promised you
(without a space). In fact, there off one end and emerged at the and that you should just go
is called Tricolours and is listed
is actually an instruction called other, but its original value does back and try again, and try to
separately. You now have suffi-
RLA' Iwith a space) which at not come into play. As before, find out what the error is.
cient knowledge to be able to
fwst glance appears to do ex- you should note that RLCA is Usually there is an error it is
understand the listing. I sug-
actly the same as 'RLA' subtly different to RLC A, and quite unusual for the break-
gest that you read the listing
Iwithout a space). The dif- that RLCB (etc) do not exist down to be caused by a glitch
and see if you can work out ex-
ference is that RL A will change wheras RLC B (etc) do. in the Spectrum itself, especi-
actly what it does, and then
the value of the Z flag, whereas ally if you happen to find a par-
type it in to see if you were
RLA will not. Best of three right, I think you will find it ticular glitch which only ever
Flags are funny things. Their There are three different types reasonably impressive, and, in occurs when you try to play
concept is quite simple — a flag of SHIFT instruction, and all of fact, a rather surprising display with machine code.
is a one-bit register, or a them are written with a space. coming as it does from a ZX The best possible advice I
register which can only store The first is called SLA the A Spectrum. can give as regards writing pro-
the numbers zero and one. stands for Arithmetic', so you grams is to make all of your pro-
There are four flags we can have to put the name of a grams as short as you possibly
make use of: the carry flag, K, register as well, eg SLA A or Programming can. This will train you to write
we've already seen; the zero SLA B. SLA is a little bit like RL techniques programs efficiently. Making
l flag, Z — if an instruction except that instead of the carry programs short involves putting
changes it (some don't), it will moving into the rightmost bit of There are several ways to learn all of the machine code instruc-
become 1 if the result of the in- the register, it just disappears machine code. One way is for tions to their best possible use,
struction is zero, and O if the altogether. The rightmost bit of me to give you a program and and sometimes using clever lit-
I result of the instruction is' not the register is instead always explain why it works. Another tle tricks to save space; for in-
zero; the sign flag, S, becomes reset to zero. In effect, the way is for me to write a pro- stance, using SBC HL,HL, in-
I 0 for a positive answer, and 1 value of the register has been gram and not explain how it stead of LD H L , 0 0 0 0 when
I for a negative answer (in other multiplied by two. There are works so that you have to work you know that the carry is zero.
I words it actually equals bit 7 of two similar instructions to shift it out for yourselves — unfor- One really useful instruction
I ihe answer); and the parity/ right which divide the ap- tunately, deciphering other which really does save space is
| overflow flag, P, is changed in propriate register by two. W e people's programs (especially the instruction LDIR (LD, Incre-
two ways: for arithmetic in- have to remember though that mine) turns out to be quite ment and Repeat) which is
structions it becomes 1 if the numbers between 8 0 and FF tricky. Several people' have equivalent to a whole set of in- i
number increases from 7F or can each have two different commented that they've structions: " LD(DE),(HL)"7INC I
Tricolours
Use HEXLD3 to load this into the ZX Spectrum. The BASIC part of the listing is as follows:
96
MACHINE CODE
se CALL c,pq C4qqpp CCqqpp 04qqpp DCqqpp E4qqpp ECqqpp F4qqpp FCqqpp
XI JP c,pq C2qqpp CAqqpp D2qqpp DAqqpp E2qqpp ECqqpp F2qqpp FAqqpp
'C-
JRc.e 20ee 28ee 30ee 38ee — — — —
er RET c CO C8 DO D8 EO E8 FO F8
id
e. INSTRUCTIONS FLAGS
Hachlnc Cod« Instructions
Op code Hex code S Z H P N C
INSTRUCTIONS FLAGS LO r.r table 1
3r Op-cod* He i cod* S Z - H - P N C LD S mn table 2
LD A ipql 3Aqqpp
is ADC A.r table 1 @ ® - @ - @ 0 @ LD s.ipQi table 2
\ ADC HL.s table 2 © ® - ® - ® 0 ® LD Ipql A 32qqpp
ADD A.T table 1 @ @ - ffi - (3> 0 <§> LD ipql s table 2
ADD HL.s table 2 - - - ® - - 0 @ >
>1 ADO IX.s table 2 LDI EDAO 0 X 0
B ADD IV. s table 2 LOD EDA8 0 * 0
AND r table 1 @ @ - 1 - @ 0 0 IP V becomes 0 ' BC becomes Oi
LDIR EDBO 0 0 0 -
BIT b.c table 1 ? @ - 1 _ @ 0 0 LDDR EDB8 0 0 0 -
CALL DQ CDQQPP _ _ _ _ _ _ _ _ NEG EDDD @ 1 ffi
CALL C.PQ table 3 _ _ _ _ _ _ _ _ NOP 00
CCf 3F - - - x - - 0 @ OR r table 1
H (lag becomes the previous value ot the C fiagi
- 0 - ffl 0 0
OUT in).A D3nn
CPr table 1 ffi @ — ® - @ 1 ffi OUT (Cl.r table 1
CPI EOAl §i x ® - x 1 - OUTI EDA3 x — _ ^ 1
CP0 EDA9 @ x @ - x 1 OUTD EDAB > K _ ? 1 -
CPIR EDS 1 ® x - O - « 1 - IZ becomes 1 B becoT' i
CPDR EOB9 @ x _ ® - , 1 - OTIR EDB3 7 1 _ _ ? 1 -
[Z becomes 1 it 8C becomes zero P V becomes 1 il A iHL 1)1 OTDR EOBB 5 1 - _ > 1 -
CPL 2F - - - 1 - _ 1 _
POP AF F1 X x • X x • X
DAA 27 Fia^s are determined bv the byte at the too o' tn« siac*
DEC r table 1 © @) - ® - ® 1 - POP s table 2
DEC s table 2 P U S H AF F5
Dl f3 - - - . PUSH I table 2
0<NZ e 1 Oee
RES b.r table
El FB - _ - - _ RET C9
EXAF, AF' 08 RET c table 3
EXDE.HL EB RETN ED45
EX (SPl.HL E3 RETl EDAO
£X (SPl.lX DOE3 RLA 17 0 - o @
EX ISPUY F0E3 RL r table 1 0 @ 0 @
EXX D9 RLCA 07
RES o.' tab'e 1
MALT 76 RET C9
RET c •ab<e 3
WO ED46 _ _ _ _ _ _ _ _ RETN EDA5
IM 1 E056 - - - - - - _ _ RETL ED4D
IM 2 ED5E RLCA 07 0
•NC r table 1 @ @ - @ ffi o RACA OF 0
INC j table 2 - - _ _ _ _ _ _ RLA 17 0
IN A.(nl OBnn RRA IF 0
iNf.ICi table 1 ® @ ffi ffi o 0
INi EDA2 > , " RLC r table 1
iND EOAA J * _ ? J , RRC t table 1 0
iZ twcomes 1 it 0 becomes zero RL r tabi* 1 0
RR r table 1 0
WIR EDB2 > 1 ? ' 1 0
WOR EOBA ? 1 _ ) _ t 1 RRD ED67
RLO ED6F 0
JPm C3qqoo RST 00 C7
JPC.&Q table 3 - - - - - - _ RST 06 CF
JPiHl) E9 _ _ _ _ _ _ _ RST 10 D7
JPDXI DDE9 RST 18 DF
JPHYi F0E9 - - _ _ _ _ _ _ RST 20 E7
18ee _ _ _ _ _ _ _ _ RST 28 EF
JRc.e labie 3 - _ - _ _ _ _ . RST 30 F7
RST 38 FF
LO BC A 02 _ _ _ _ _ _
IDA.lBCl OA • - - - - _ _ _ _
U) IDE). A 12 _ _ _ _ _ _ _ _ SBC A r taoie 1
ID A.lDEi 1A - - _ _ _ _ _ _ SBC HL.s table 2
SCF 37
LO i.A EDA 7 _ _ _ _ _ _ _ _ SET b.r table 1
J ID fl.A ED4F _ _ _ _ _ _ _ SLA r table 1
LO A.I ED57 ffi ® - 0 - « 0 SRA i table 1
LDAR ED5F ® @ - 0 * 0 Si-R r table 1
P V is set to interrupt storage Hag) SUB r tab'* 1
| LDSP.HL F9 _ _ _ _ _ _ _ _
| IDSP.IX DDF 9 _ _ _ _ _ _ _ _
•E
LDSP.IY FDF9 _ _ _ _ _ _ _ _ XOR r tabi* l @ 0 - 0 0
97 ZX COMPUTING FEB'MARCH 1 9 8 3
In Morley to serve THE SOFTWARE BANK
West Yorkshire
DRAGON BYTE L e n d a tape a n d b o r r o w o n e of y o u r c h o i c e .
51a Q u e e n Street, M o r l e y , Leeds.
N O W IS Y O U R C H A N C E T O T R Y O U T P R O G R A M S
Home Computers. Software, Board Games B E F O R E Y O U B U Y F A S T R E L I A B L E S E R V I C E ALL
TAPES CHECKED BEFORE DESPATCH.
SINCLAIR SOFTWARE SPECIALISTS
(but our range grows daily) COMPUTERS REPRESENTED:
If you feel like interfacing with liveware (i.e. ZX81 SPECTRUM BBC V I C 20 D R A G O N 32
people) we also sell the best range of BOARD
GAMES and ROLE PLAYING GAMES in the (ENQUIRIES W E L C O M E FOR O T H E R C O M P U T E R S )
area.
O N L Y 5 0 p / T A P E B O R R O W E D PLUS P&P
Especially the rapidly growing Dungeons and
Dragons' £8.95 S e n d £ 5 A n n u a l M e m b e r s h i p F e e o n full m o n e y - b a c k
a p p r o v a l a n d w e will supply y o u with our information
RING (0532) 522690 or, after 7pm, Keith Nathan s h e e t a n d order form.
(0532) 788377 or Dave Town (0532) 524543 for
more information and mail order details.
THE SOFTWARE BANK
35 A L E X A N D R A R O A D
M a n u f a c t u r e r s are invited to contact us STONEYGATE
L E I C E S T E R LE2 2BB
Au pricti include UK P&P and VA T nhe/t ipplicaIHe Oversees customers *dd CI SO per item lor lutfece mtr!
T I M E D A T A Ltd. o«Pt G
16 Hemmells, Laindon, Basildon, Essex Tel: (0268) 4 1 8 1 2 1
98
LimEDACA^^ ZX COMPUTING FEB/MAR 1983
ZX COMPETITION
Competition
spaceship, Your mission is to All entries must be postmarked
overcome the hazards and before the 31st March, 1983.
dangers of the planet, and find
The prizes will be awarded to
your spaceship. This cassette is
the three entries with the
also one of the new range of
Name
Address
•E
r
99 ZX COMPUTING FEB'MARCH 1 9 8 3
"A" LEVEL A N D UNIVERSITY S T U D E N T S
RESEARCHERS, S C I E N T I S T S
{HniUcrsitp iS>ofttoare
P R E S E N T S S I N C L A I R Z X 8 1 (16K)* LIBRARY \
OF ADVANCED MATH/STAT/ECON SID HORROR ADVENTURE GAME!
M a d e e a s y t o l e a r n a n d u s e w i t h full i n s t r u c t i o n s .
T A P E 1 : MATRIX O P E R A T I O N S E5.95
Side A : Inversion, multiplication addition, subtraction and scalar multiplic-
ation of matrices and vectors within one single program which allows the Occupying over 13V4K of memory, a superb 3D graphics
user tocompleteall his operations without reloading Inverts a 20 * 20 main* adventure game for the ZX81 with 16K R A M , for only
m 6 mm, 40 sees
Side B Determinants of square matrices £3.95! Enter Dracula's tomb at 30 minutes to sunsent
TAPE 2 : POLYNOMIALS £5.95 . . . w a n d e r through the tomb's pre-mapped 300 vaults
Side A Includes quadratic equations (as degree 2 polynomials) and Newion- in search of the fabled Vampire's Treasure ... pick up
Raphson and halt-interval search methods for higher degree polynomials
Computes the roots with 8 digits ol precision valuable silver stakes and use them to defend yourself
Side B: You can plot polynomials in any interval and examine their roots against the lurking horrors . . . ghouls, zombies, pits of
extremum points. primaeval slime . . . See them all on the ZX81's plan of
TAPE 3 : INTEGRATION £5.95 the tomb ... when it will let you! T a k e a chance on a
S I « I ? A Integration of lunctions by Simpson s and trapezoidal rules Also
computes the area enclosed by two functions Mystery Vault ... if your dare! A n d all the time the
Side B Plot of integrals integration can be visualised on the screen minutes are ticking by to sunset ... when Dracula rises
TAPE 4 : REGRESSION £6.95 from his coffin and comes after y o u ! EaCH of the
Side A A highly developed multivariate regression program featuring up to
20 independent variables, log/in option on each variable (thus allowing infinite levels of the tomb has its own 300 vaults ... go
exponential, geometric and nth order regressions), standard errors t- as deep as you like, the Prince of Darnkess will seek you
statistics. F-stalistic, Durbm-Watson statistic, interpolation out in his blood-lust! W A R N I N G : people of an
Side B Plot of bivariate regressions. You can see how your computer draws
a best-litting line on a set ol data points exceptionally nervous disposition should play this game
TAPE 5 : LINEAR PROGRAMMING £6.95 only during the hours of daylight! Special facility
Side A Ageneral and elficient optimization program capable of handimgany enables a game in progress to be saved on tape so you
sort of linear programming problem with up to 20 variables and 20 constraints
Features the cannontcal equivalent of the original problem and its dual can continue it whenever your choose.
Side 8: Solutions of simultaneous equations with up to 30 unknowns
Price of only £3.95 includes ready-to-load cassette with
• Cheques P O.'S payable to • Five tapes for E30 library case and inlay, full instructions, postage and
UNIVERSITY SOFTWARE • All incl. prices for first class P&P packing. Order today! Money refunded if not delighted!
4SC Sioane Street Send cash, P.O. or cheque to:
London, swi X 9LU • Delivery within a week of receipt
* Available soon tor Spectrum M O V I E D R O M E VIDEO DEPT. ZC3
19 Leighton Avenue. Pinner. HAS 3BW
100
ZX C O M P U T I N G FEB/MAR 1983
Have a day at the races
with Terry Mills of
Stockport.
In this program for the unex- Line 81 82 Introduce a slight
panded ZX81, there are four delay before the
horses (denoted by inverse next movement
numbers! running in a race. of the horses is
Here is a breakdown of the made.
listing to show you how the Lines 8 5 - 9 0 Print the horses
program works: in their new
position in the
Line 5 Displays the start race.
and finishing Line 9 5 Decides if a
posts of the horse has won
course. the race; if a
Lines 10-50 Set up the particular horse
variables. has won, the
Line 55 Prints a space winner is
over the old displayed and the
position of the game ends.
horses. Line 1 0 0 If none of the
Lines 6 0 8 0 Calculate the horses have
random reached the
movement of the finishing post,
horses. the program
returns to print
the new position
of the horses.
•E
G.H;" "
1
program. Freeway Frog, which panted with a brief explanalu
troductory text to the field of the information in that section is listed over 36 pages of the of how the program works
machine and assembly lan- or a number of exercises for book. From first programming some cases, the programs ai
guage programming for the ZX readers to work their way principles, the structure of the illustrated with screen display
Spectrum. through. program is planned, developed dumps of the game beinffl
Inside the book, there are The next section, 'Program- and finally put together to form played.
five section headings, each of ming your Spectrum', deals a complete listing.
which has been split up into a first with the planning of a pro- There are seven appendices, Games ZX Computers Play, I
number of sub-sections. The gram; this is fairly compre- with useful data you'lt need edited by Tim Hartnell, a
first section is called 'Finding hensive, dealing mainly with when you begin experimenting published by Interface Pubfc1
your way around in machine the 'top down' approach to dis- with machine and assembly cations. The book has 169f
language' and starts from the ciplining your programming. language yourself. pages and is priced at €3.25.
very beginning, assuming abso- Then the authors take a look at ISBN 0 907563 13 9
lutely no prior knowledge of the Spectrum itself, paying par- Spectrum Machine Language
working with machine lan- ticular attention to the key- For The Absolute Beginner,
guage. From the basics, board, the video screen display edited by William Tang, is The Spectrum
though, you quickly move onto
how to manipulate the stack,
and the sound output. published by Melbourne House.
The book has ?43 pages and is
Pocket Book
The last two sections con-
loops and lumps, use of sub- centrate on actual programs priced at €6.95. — Trevor Toms
routines and block operations. listed within the text. Looking ISBN 0 86161 'W 1
The second section of the first at monitor programs, there Continuing the 'Pocket Book'
text deals with 'Instructions are two provided: EZ-Code series, this book goes further I
Games zx than its two predecessors
about the Z X 8 0 and ZX81, j
Computers Play providing the reader with pro-
— Edited by grams which are fun, serious,
Tim Hartnell educational, and a number ol
'useful' tools for your Spec- !
trum.
Recently crowned the 'Barbara The programs in the first
Cartland of the computer book part of the book, the BASIC
field', Tim Hartnell here pro- section, cover a variety of sub-
duces a book for the Spectrum jects. Ranging from the obvious- i
a n d Z X S I which would fall into games programs such as Robot
the 'fun' section of his range of Chase, 3 0 Maze and Reversi,
books. there are also a number of
Containing 13 programs for 'serious' listings such as
the ZX Spectrum and 1 5 for the Budget Account, Debugging
ZX81, all the listings are direct Programs, Useful Subroutines
from the ZX Printer, well repro- and User Graphics Tablet.
duced and guaranteed to run. The second part of the book,
The emphasis is on moving the Machine Code section,
graphics, intelligent play by the begins with an introduction to
computer, user-defined graph machine code followed by 3
ics where needed, and provid- comprehensive section relating
ing the reader with program- the use of machine code dir
ming ideas which can either be ectly to your ZX Spectrum.
adapted, converted or im- Also included in this section are
proved on. Z X A S M , a Symbolic Assemb-
The book contains a variety ler; ZXDISASM, a Symbolic j
of programs contributed by a Disassembler; and ZXMCMON,
number of experienced pro- a machine code monitor. An ap-
UNDERSTANDING
Kob'n Bndbeer ~ yourswectrum
; L E A R N I N G . -
D * . IAN LOGAN
„ —\
T O • U S E T H E
v y
'2L4 iJ j
IPI 'TCRf
skcjW
The working routines in chapter five, in- chapter introducing the Spec- Learning To Use The ZX Spec-
Spectrum cluding Calculator, Calories,
Graph, Renumber and Typist.
trum, followed by a section on
using the ZX Spectrum. This
trum Computer, written by
Robin Bradbeer, is published by
- David Traditionally, all computer last chapter tells you in very Gower Publishing Company
Lawrence books should contain at least simple and easy-to follow in- Ltd. The book has 76 pages
one game, and this book is no structions, how to begin your and is priced at £4.95.
exception. Three games listings computing career on the ISBN 0 566 03481 6
This book is based on a collec are included Tracker, Missile machine. At the end of the
tion of programs written on and Word Sort. chapter some self-test ques-
such areas as data storage, Each listing is given as a tions are included for the reader
finance, calculation, graphics, series of modules. The modules to assimilate how much ex Understanding
household management and are accompanied by an explan- perience has been gained. Your Spectrum
education.
Split into six chapters, the
ation of its function, a commen-
tary on the individual lines, and
Chapter three introduces the
reader to some elementary pro-
— Dr. lan Logan
ffst chapter highlights the suggestions are given to per- gramming skills, with details on
Spectrum as a filing cabinet. form simple tests on the how to SAVE programs on Dr. Logan claims this book has
Providing a program called Uni- module to assure yourself that cassette and how to use the ZX three main aims: to explain, in
file, any file containing records the module is correct before Printer. Again, self-test ques- simple terms, how the Spec-i
•E
ivith a regular structure can be continuing to type any more in. tions are provided to help trum works; to teach Z 8 0 code|
THE
.flmESTOPwyon
w
youfl ZX SPWTRUm
msrfen U W - H i i t c n
ZX81 16K SPECTRUM RAM Cassettes
Great games
Games to Test your Skills £r Tactics
"VERY NASTY MOUNTAIN and NASTY INVADERS...are both vary well
written"; " I am thoroughly pleased with the goods" : Client. London
"Thanks for your very good VERY NASTY MOUNTAIN": M,F. Harold,
for your # *
Guildford, Sy.
"NASTY INVADERS...VERY NASTY MOUNTAIN with no loading pro-
blem* at all and the literature you included, will certeinly purchase fiom
you again": N.O.H., Hudderafield
Spectrum
"I am writing to congratulate you on the excellent VERY NASI Y MOUN-
TAIN. I am also pleased with the quick delivery": R Massingham, Bailey.
W. York*.
" I like NASTY INVADERS...the graphics are excellent; VERY NASTY
MOUNTAIN Is also an excellent game. Those art two of the best gam** 1
have for my Z X 8 1 . " : Michael B. McAllister, Lekenheath. Suffolk
NASTY INVADERS: Get them before youi Bosses get youl £4 95
A 2 0 minute plus Action-Packed Game. You are on duty in the Defence from
Radar Centre. An invasion starts. Your task i* to prevent the Enemy from
landing. But you have problems: not only do you have to stop the Invaders
> I I V r | r | [ j •-» * i the l e a d e r s
making repairs to their craft, but there could be personnel trouble tool
Good control i* rewarded, but errors are penalised.
u U A j JI T J in ZX g a m e s
Don't despair — Rank Has It* Privilegesll
NASTY MOUNTAIN: Solve the Clues if you want to Escapel £4 9 6
You are leading an expedition and come to an impassable mountain range.
It looks like a long detour until an old goat-herd announces that there is an
opening in the rocks into which the occaaional animal wandeis, but they
never re-appear See if you can solve the mysteries of Nasty Mountain
and continue on your travel*. Whether you succeed or fail, you can
always try again — but somehow its not quite the same as before!
VERY NASTY MOUNTAIN: But don't CHEAT or you will pay for itl £ 6 9 6
An edvanced version of the Nasty Mountain Game with 16 Levels of Play.
Practice Makes Perfect — but the more clues you solve, the more your
tactics are tested I
Justify Your ZX 8 1 As A Business Expense
PETTY CASH/VAT: Know where your Money wentl £10.00
Enter Data, Narrative and Gross Expenditure for each Ca*h Purchase
Analyses into 2 0 Sub Headings and 13 Mam Headings and gives Gross.
Sorcerer's Castle
VAT. Net and Exempt Subtotals and Total* Its so good, we use rt
ourselves.
VAT BOOK INPUTS: Wntten for the Small Busina*s ft Sole Trader £ 1 2 . 0 0
A* the Petty Cash/VAT Program, but with the facility to add in your Che-
que and Standing Order item* to give Input* Bottom Line Totals
CHEQUfcSiP.O a TO: — GIITROLE LTD . DEPT ZXC. T a k e s you into a world of magic a n d
P.O. BOX 50. RUGBY, WARKS C V 2 1 4DH mystery. Graphical position a n d a host
of options with this exciting a d v e n t u r e „ _ n
g a m e for the 4 8 K S p e c t r u m £5.5U
ZX SPECTRUM & ZX81
EDUCATIONAL SOFTWARE
Scramble
H i g h - s p e e d a r c a d e g a m e - the fastest
available. T h r u s t altitude, fire a n d b o m b
from Andrew Tierney of key for down, the ' T key for up
and the '8' key for right. There
left when you reach the che-
quered square.
10 LET C = 50
20 LET A 0
30 LET B 0
40 LET X INT ( R N D * 1 0 )
50 LET Y INT (RND * 101
60 PRINT AT X.Y;
"(Graphic shifted A)"
70 FOR N = 1 TO C
80 PRINT AT A,B;" •
90 PRINT AT A.B;" "
100 IF INKEY$ = " 5 " THEN
LET B = B 1
110 IF INKEY$ - " 6 " THEN
LET A - A - 1
120 IF INKEYSS = " 7 "
THEN LET A A +1
130 IF INKEYS$ = " 8 "
THEN LET B = B + 1
140 IF A = X AND B - Y
THEN GOTO 1 8 0
150 NEXT N
160 PRINT " H A R D LUCK"
170 STOP
180 PRINT "WELL DONE
SCORE = " C - N
190 PAUSE 50
200 LET C = C-1
210 CLS
220 GOTO 10
MIC
fTW
o-
TO EAR ON
COMPUTER
« LSI
REC
•o
TO EAR ON
CASSETTE
X T OFF
S2
PLAY
The tape head on most maximum treble, minimum audio inject for identification. The
cassette machines is mounted bass, and insert a tape con- speaker is used for audio moni-
on two screws, one of which is taining a program. toring.
Fig. 1. SI and S2 are both 2-pole.
sprung. By adjusting this 2. With the earpiece out, start 3 way slide switches and S3 is a
screw, the tone can be altered. the recorder. 1 pole. 2-way biased push button Fig. 2. This circuit is for use with
The screw is accessed by a 3. Adjust the screw, trying it in slide switch. J is a 3.5mm jack low level output from the tape
small hole above the play head. both directions, until the socket tor a microphone andLSis a deck. Adjust R1 and R2 for differ
In many cases, this hole is sound is as 'tinny' as possi- miniature 7 5 Ohm loudspeaker. ent outputs from the tape deck.
covered by tape, or a small ble. You wHI also need four 3.5mm jack This circuit was designed to
metal plate. plugs with screened leads. This cir- operate with a Sanyo 5050G deck,
cuit can be contained in a box 580m V at 5.6K output.
Here's how you can adjust Note that this may make measuring 3" by 2'A" by 1'A".
your azimuth; some of your music cassettes The switching allows recording
sound a little too sharp for your and playback without removing
1. Turn the recorder controls to liking. plugs. The push button a/lows
AAAA- •O +5V
R4
10R
R1 R3 C3
68k < 470R 100p
14
CI
470n
FROM TAPE SCHMITT
REC OUTPUT 11" TRIGGER
74LS14
T3
Q1
BC109
TO TAPE INPUT
SHORT Z X 8 0 C 1 2
u IOU
- O OV
I N O W A V A I L A B L E F R O M ASP S O F T W A R E
See page 114 for further details
1 R E H j ^ B R E f l K - O U T L t T P =P
3 BOROER i?; LET H*=© LET r>* = 14-© P R I N T R T 2 1 , P , INK 2; :
RETURN
5 GO S U B 2 0 8 f t j » i , P R I N T R T 21,2; 1 9 9 R E h * * E N D OF U * R i _ L * i
1© P R I N T R T 1 9 , S ; FLASH 1, BRI 2 © © PRLi&E 1 © © : CLS : I F f p = 1 TH
GMT 1 ; " P R E S S RNY' KEY T O F L R V " E N GO T O 5
1 2 F OR f = 1 T O I S © © ; X F I N K E Y 2* : 2©3 LET » = » + ! : P R I N T RT PR
>"*' T H E N GO T O IS PER 5 ; "Wat I n o , dcf-trove
1 3 N E X T f . GO T O 3 © © © d . "
I S SEEP , S , © : L E T fP =©: L E T J = 2 © 5 F O R r*=© T O 1 © ; BEEP ,2.- f : N
© EXT f
2 © GO SUE- 9 © © © : GO T O 2 1 © I F W = S T H E N GO T O 2 3 ©
9-9 R E H * * K E Y B O R R D SCRN** 2 2 © PHUSE S©: P R I N T RT 6 , 4 - ; PRP
1©© I F f p - 1 Tj-fEN GO T O 5 © © © ER 4-; INK 7 ; "Now g o o n t o w a l l ";
1135 I F INKEY«o"l" RND INKEY5-;.' V ; PAUSE I S © . GO S U B 9©©"7; GO TO
- e - THEN RETURN 1©0©
!«.© P R I N T R T 21,p;" 2 3 © P R I N T RT S , 3 ; P.RPER 4-; INK
12© I F I N K E Y $ = " 2 " RND P > 1 T H E N ©; FLRSH 1 ; " W E L L DONE, "J FLR5H
LET P = P - 1 ^ 0 ; " y o u have d e s t r o y e d alt the * B
1 3 © I F i « K E Y S = " » " R N D p < 2 9 THE)**
isiggs^*"-
CREVASSE + HOTFOOT (Spectrum 16KI Two original games
using the Spectrum's abilities lo the full In CREVASSE you are on
the ice cap with chasms opening and closing all around you. Can
you make it across the perilous ice"* In HOTFOOT you must help a
at aw®*
rabbit get to the carrots m the fields around its burrow. But the fields
are dangerous, and the plumper the rabbit the greater the danger
The only salety (and the only way to score') is to get back to the
-.PO1 „.K..r>;W burrow Now where was i t ' £4 95
EVOLUTION i<i8K Spectrum) Starting trom ihe primaeval soup
can you retrace the course ol evolution and end up with man? Can
you keep the earth's eco systems in balance, respond to climatic
/ l b I changes and survive the odd cataclysm'' It should be easy after
P CT find a special gilt for someone who does, why not have your own
cassette labels printed complete with logo? Prices start at only
vxl 49tJP 0
CT C4 9 5 for 5 0 labels or C7.95 for five C 2 0 cassettes with labels fitted
Send s.a e for design and order form
w i t h ! - 1 — M
lPatent applied lor)
£13*95 • £i-4o p/p
P R O T E C T Y O U R P R O G R A M M E S W I T H T H I S R E C H A R G E A B L E B A T T E R Y PACK
AT LAST! Tne answer 10 one ol IK- nvior pr ibiems fac-ng personal com-
p-< r a n ' -rs and J >"S - POOR MAINS SUPPLIES CAUSING
HAVOC, WHILE YOU SPEND HOURS TRYING TO ENTER YOUR
CAREFULLY PREPARED PROGRAMMES
BATTPACK ensures Ihe voltage into your ZX computer never drops below P L E A S E SUPPLY . (QTY) D a t t p a c K /s
9v thereby eliminating ihe possibility of a programme crash because ol a AT£13-95each PLUS£l40p/p
spin second mams dropout' (One cycle is all it needs')
I E N C L O S E C H E Q U E P O S T A L ORDER FOR £
BATTPACK also suppresses transients and RFl using carefully selected
capacitors Your ZX Adaptor keeps the BATTPACK at Ml charge even
when in use — so its always ready tor emergencies. Even in the event of a full
power cut BATTPACK will run your ZX computer tor at least 30 minutes
giving you time lo save your programme on a cassette or print a hard copy on
your ZX printer
BATTPACK comes complete with all connecting leads and is ready for use
O R D E R N O W — SAVE N O T O N L Y Y O U R
P R O G R A M M E S BUT ALSO YOUR
I ADDRESS I
TEMPER!!
I I I I I I ! I
112
S O F T W A R E REVIEWS
In the air
bowls 8 to 13 at the top mountains using the detailed
'belong' to the ZX81, and bowl direction finding equipment,
1 4 on the left is its 'home'. and while battling against the
tonight
The idea of the game is that forever-changing tropospheric
you may choose one of the conditions, you must land using
bowls numbered from 1 to 6, manual control or autopilot.
which contain at least 1 bean, Never is life made easy for you,
remove them and place them with an astounding, and at
one at a time in the bowls to the times confusing, array ol dials,
right and anti-clockwise. The counters, and controls. Unlike
ZX81 then chooses from bowls most other flight simulation
8 to 1 3 and moves to the left programs for the ZX81, you
and anti-clockwise. When you don't just have the standard
After a brief time in get more proficient, you can in
vestigate the more complicated
altitude, distance and speed
commands, but an array in-
simulated flight, James moves. There are three levels of
play, which will accommodate
cluding: Artificial Horizon,
Automatic Direction Finder, In-
walsh comes down to an intelligent eight year old to
an adult.
strument
Wind
Landing System,
direction and speed,
earth to look at the Though the game is basically
quite simple, it is more addic-
heading, VHF Omni Directional
Range...and the list goes on.
African game, Awari. tive than most non-high speed
games are. The game is well set
The game is definitely not
easy and warrents good and ex
out and has a good amount of tensive instructions. The actual
intelligently used graphics. instructions are available in suf-
SECOND P L f l Y E R /QfiHE. In conclusion, though it is ficient quantity, but they are
11 13 9 not the most sophisticated not particularly exciting or easy
Z X 8 1 program on the market, to understand. This was not
Awari is ideal for all the family. written for the bloke who
By the way. it LOADed first wants the next step up from
time. 'Space Invaders' or 'Pacman',
but n is more of a thinking per
ju Awari is priced at £ 5 . 9 5 and is son's game. I was surprised by
available from Understanding the statement in the instruc-
5 v- r Ltd, The Production Village, tions which read: 'This program
Ua jn 1 0 0 Cricklewood Lane, London is not a game'. This is a strange
N W 2 2D5. thing to say as it fulfills all the
attributes which normally are
:: c 3U L assigned to the word 'game', in
«A «
j. - § Come fly with me that it is a contest in which skill
is required and is done as a
I I I I I i 8 Pilot is a new flight simulation pastime, rather than as work.
3 4 5 program from Hewson Consul The program is very well
tants, written for the Z X 8 1 . written and the graphics are
There is also a ZX Spectrum pretty good for the ZX81,
version available for the same though some people may get
!OL:E NO MRDE SY MOUE price of £ 5 . 9 5 , which is funda- bogged down with the instruc
mentally the same but with tions. If you are interested in
FLRYER 1 graphics more suited to the
CQNR^T 1 this type of game, then I can
capabilities of the Spectrum. recommend it as the best one
PLRYER E
ORBETT 11 O The idea behind a flight that I have seen on the market
PLRYEP. C;
- — simulation program is that you for the Z X 8 1 so far.
RRBBIT e are piloting your own aircraft
PLflYER "Z/
and are in total control over it. Pilot is priced at £ 5 . 9 5 and is
RRB&iT 9 . 13 First, you can take off using the available from Hewson Con-
PLRYER 1 navigation beacons, man- sultants, 60a St. Mary's Street,
RREEIT 1£ . 11 eouver your way through Wallingford, Oxon 0 X 1 0 OEL.
PLRYER
RRBEIT ie
P L A Y E R E P I L O T - M O D F
R A B B I T , (P
7 TC 23
•E
available from the people at to beat the computer. Similarly,
ZX COMI
113 ZX COMPUTING FEB'MARCH 1 9 8 3
• • •
ZX computing software
Typing T h e t a p e is n o w a v a i l a b l e a t £ 5 . 9 9 i n c l u s i v e o f
V A T and postage and packing. T o o b t a i n one
o f these tapes, s i m p l y fill in t h e f o r m a n d
Traumas?
r e t u r n it t o t h e f o l l o w i n g a d d r e s s :
ASP Software,
ASP Ltd,
1 4 5 C h a r i n g Cross R o a d ,
T i r e d of t y p i n g - w h y n o t let A S P S o f t w a r e
London W C 2 H OEE.
t a k e t h e strain?
Please s e n d m e tapes
W e have gathered together four great programs
f r o m t h i s issue o f Z X C o m p u t i n g a n d p u t t h e m I a m e n c l o s i n g my {delete a s n e c e s s a r y i
c h e q u e Postal O r d e r I n t e r n a t i o n a l M o n e y
a l l o n o n e t a p e . E a c h t a p e is t r i e d a n d t e s t e d ,
O r d e r lor £
a n d w o u l d be a w e l c o m e a d d i t i o n t o y o u r i m a d c p a y a b l e to ASP Ltd)
software library. or
Debit m y Access B a r c l a y c a r d '
('delete as necessary)
S p e c t r u m B r e a k o u t - Y o u have five chances
to demolish the multi-coloured wall.
ADDRESS
Drainpipes - A Spectrum adaptation of the
classic m e c h a n i c a l a r c a d e g a m e .
POSTCODE
S p e c t r u m M a z e - A l l y o u h a v e t o d o is t o get
o u t o f t h e m a z e as q u i c k l y as y o u c a n . S o u n d s Signature
easy... Date
Z X issue t a p e
Micro
if you run your own business.
Every month we'll tell you
what's best and what's best to
avoid among the flood of micro
products.
And our feature articles will
be packed with information you
can use. Our news pages will keep
UPDATE
Published t>v Argus Specialist Publicaiion\ I td.
• Fully expandable.
73 The B r o a d w a y , G r a n t c h e s t e r , C a m b r i d g e C B 3 9 N Q
SPECTRUM HARDWARE
TV stand removable tor access to add-ons. wiring, etc (Jan be used
separately from the base
2X C O M P U T I N G F E BM A R C H1983 115
SOUND with SINCLAIR
M A K E AMAZING SOUND EFFECTS
WITH YOUR ZX 81.
TIMEX Sinclair 1000
or S P E C T R U M
THE ZON X
£25.95
'ClD&P&VAT
• Tne ZON SOUND UNIT ts completely sefl-contamed and especially
•)",7iQfi-1for use »vir. :hc ZX 81 TIMf x Snr.ia' tOOO and Spec1rum
Cc-Vulfs It iust fiiugs in — no dismantling or soldering
• •. • i • •
• Manual Volume Conliol on panel — ample vtfome Irom bu'-Tin loud-
speaker
• . • ,' V1
Sound U't Aitnoui affecting normal ompjle* operation
T
• Huge raffle or possible sounds for Games Music Helicopters Sci-ft.
SipaceInvaders Explosion® Gur shots [>ums Plant's lasers Organs
fl>' s Tunes Chords etc O' whatever you devise1
•
pitch volume ct Tones and noise al with envelope control
• Eas>V added lo enrsimg games or programmes using a tew simple
BASIC lines (y machine code
"N • No memory addresses used — i O mapped
FULL instructions with many p i a m p l r * ol how lo obtain ellecls and
the programmes, supplied Fully guaranteed British Made
These stylish plinths, "Bicvpt win Spectrum you neett the Spectrum Ettension Bo
Order No Sfr PRICE £6.80 Inc VAT
in tough moulded ABS, will raise and tilt the TV for better
r ^ Payment "iay oe made by Cheque PO
viewing, and angle the computer for easier typing Giro No 366 7006 Postal Order Of C«d't
The power supply is fixed underneath. The printer can be Card
used with the Spectrum version, the RAM with the ' 81'. E>pofl orders Bank Cheque Interna
•• , • !i « • ' -•••• •
and the cassette player with both Full details from:
BhPAK
Peter Furlong Products. Unit 5c. South Coast Fid Ind. Estate.
Peacehaven. Sussex B N 9 8 N A Tel (07914 ) 81637 Oapt/x PO But ACC«UfrVT$A OCC4CM
63*. MgnS»«« 9ing0920 31MMr
vm.iws immtdto* oti^JM
lan Turtle
presents us
with a ZX80
version of
the popular
game.
The computer first selects four The number of black and white in the right order.
different random numbers from pegs you are awarded is then There is a display of all your
the limits you suggest — you worked out once you have previous guesses and the black
then have ten rounds in which guessed four numbers; a black and white pegs awarded, to help
to guess the hidden code. peg is awarded for each you make your next decision
Each round consists of you number correctly placed in the N o t e that the s y m b o l * is
inputting your guess by typing code, a white peg for each cor- used in the listing t o indicate a
each number and pressing rect number but wrongly space w h e r e it is not obvious
Newline. As the Z X 8 0 accepts placed. Your a i m in the game is (usually in PRINT r ' a t e m e n t s
each each number, your guess to achieve four black pegs thus before semi-colon i ) .
will be displayed on the screen. signifying four correct numbers
Spectrum maze
Bill Longley of Colchester has written a program
for you to lose yourself in your 16K Spectrum.
The game's object is to get out character to the right. The star-
of the maze in the shortest time. ting address is 2 3 7 9 8 .
This is not quite as simple as it Line 3: Smoothly moves the ac- 1 TOP LINE SHOULD A L W A Y S BE BLACK
sounds as you can only see a tual characters to the left by one 0
1
quarter of the maze at any one square (scrolls by one pixel each
0
time, and the whole thing is four time, for eight times). The star-
1
screens long rather than the ting address is 2 3 8 3 6 . 1 TOP T H I R D 10101111 W H I C H IS 1 75 I N D E C I M A L
usual one. The way this is done Line 4: Smoothly moves the 1
is by moving the maze to the left characters to the right by one 1
or right rather than moving you. square (scrolls by the same 0
Normally, this would be very methods as used in line 3). The 1
slow, so the movement is done starting address is 2 3 8 7 6 . 1
by machine code. So is the ac- 1
tual printing of the maze, and The fifth line is also machine 1 MIDDLE THIRD 01111001 W H I C H IS 121 I N D E C I M A L
•E
£055 DRTR 180 1 3 0 , 1 8 0 : RETURN
At last there's a really cheap but efficient Allow up to 28 days for delivery.
way of ironing out the ZX81's only real bug: its Orders to Filesixty Ltd., 25 Chippenham Mews, London W9 2AINI.
First steps in
programming your
ZX81
Tim Hartnell
introduces
newcomers
to the
ZX81keyboard
The first time you look at the you want, it is very easy to in- The Shift key (the one with In Fast mode, the computer's
ZX81 keyboard, you are likely struct it. the word SHIFT in red, in the thinking is considered more im-
to be in for a bit of a shock. As Plug in your computer as bottom left-hand corner of the portant than looking after the
well as numbers and letters shown in the manual which keyboard) allows you to get the picture, so it can become very
more or less where you would came with it. An inverse K la words and symbols written in jerky.
expect them to be on the white K on a little black square) red on the keys, as you'll see in However, it is much easier
typewriter keyboard, there will appear in the bottom left a moment. to enter a program into the
seems to be a bewildering col- hand corner. This is called the 2 X 8 1 when it is in Fast mode,
lection of odd symbols and
words within the key outline,
cursor and it is the key to work-
ing out which possibility you'll
Slow/Fast so we need to be able to switch
between modes at will Fast
with other words above and get when you press a key. If the When you first turn the com- to get a program into the com-
below the keys. Trying to work cursor is a K, you'll get puter on, it is in Slow mode. In puter and Slow for RUNning it.
out how to get what you want numbers or 'keywords' (the Slow mode, looking after the As I said, the computer is in
from a key — and some keys words in white above the keys}. smoothness of the television Slow mode automatically when
can produce as many as five We'll look at keywords and the picture is considered more im- you turn it on. To get it into
different results — can seem other possibilities in more detail portant than 'thinking', so the Fast mode, press on the Shift
very difficult. shortly. If the cursor is an in- computer does its thinking bet- key (remember, it's the bottom
But it is not. The computer is verse L, the keyboard works ween sending picture informa- left-hand corner of the key-
designed so that it knows, more or less like a typewriter. tion to the television. The great board) then press the F key
more often than not, which of That is, you press the S key, majority of 2 X 8 1 programs, like (which, as you'll see, has the
the five possibilities you will and the letter S appears on the nearly all those in this issue of word FAST written on it in red).
need. And when the computer screen. The other two possibili- ZX Computing, are designed to The word FAST should appear
cannot tell from the context of ties for the cursor are an F be run in Slow mode, so the on the screen. Now press the
what you're typing in which (function model or a G computer is in the correct mode Enter/Newline key (second
part of the key's possibilities (graphics mode). for running them automatically. from the bottom, on the right-
W
GEMINI
LOW PRICES N E W LOW PRICES N E W LOW PRICES N E W LO'
EW LOW PRICES N E W LOW PRICES N E W LOW PRICES NEW
N E W , LOW PRICES N E W LOW PRICES N E W LOW PRICES
SOFTWARE
ZX81 (16K) SPECTRUM (48K)
STARTREK
Features an 8 x 8 Galaxy. Klingons and Starbases, short and long
range scans. Torpedoes and Phasers, Computer etc.
PLUS Normal or Hyperdrive: choose your speed but watch the
energy level.
Galaxy Map: keep track on where you have been. Also, shows o—t Si*
whether any Klingons remain there, and where the starbases are t a copy 0/ r*iur f oothmU
Msr%0g0, Spmrt'unr 48K gmmm m rouplm
Visual display ot Enterprise's position and movement. WMA a mgo mr%a fmft I mutt /U*t wrttr
mnd cof*Qtmtutmtm you on $ueft mt md
Visual display ot photon torpedo. CfrC t' » m g»mm
Messages from crew members. t ttMrlmd on thm hmgtrmmrx tk,N rmvmi
th fpi mrit h J own m thm fourth Ot*>
5 levels of play And much more I W>« Aftmr hmwng plmymd fit iMinm f
oow into thm fuwt if, i, tat on hmvng
Cassette plus full instructions I won thm f A Cup *Ai/if thm
tf'ritiOn AH of mhtrh tun* mhout mnm
I hour* of bmtng gtumd to thm atrmmn
ZX81 £4.95 SfXm rtf( htng thm hrut aron $
I -£6.95 -SPECTRUM hmvm tnctrnmmmd my iff fmvmf mn,t mm
Spectrum £5.95 (colour and sound too) t*Omr math m thm tmhfm mttmi tmr• • mm % on %
^£5.95 ZX81 mna mttaui IJ hourf»
Good software wanted. Thm rmmaon t mm nup'ismd thst t hmvm
pfmymd thu gmmm mo*m thmn mity oth**
ithswdware sraunmr my hb'mr, owmr thm Imst two wmm*> * if
S pec (rum 48K RAM fXBI 1 6K HA\
GEMINI SOFTWARE
brncmutm I don t *»»ifr Wt **mtch,ng
Tii Ofd<H %end Cheque P O f>.iy.*Me lo tootbmfi on tmfmtnnton / don t m rmn iup
port m trnmm Thm strut tutm &f your gmntrn
AODICT1VE G A M E S
it tu<h thm r mnynnm < mn pimy if
36 BADMINTON ROAD, LEICESTER LE4 7RQ *< Dopt I X C
CUNMHURROW
P O BON 2 7 8
P A MACKWJth
Mil tO\ Kt vfttf s MK14 ;M 9U*V ST fDMUNDS
TEL: (0533) 64915 fitMSf STATf CCMPifTtfi OAtGlMAlS CA* M SttN O* mi Qui St
AND "WELCOME" THE NEW DRAGON 32 ALIEN COMMAND (16k) Testing Invaders style
AVAILABLE NOW £199.50 game making full use of Spectrum sound, colour
ALSO SUPPORTING SOFTWARE AND HARDWARE and graphics • * SPECIAL XMAS OFFER £4.75* •
Come and see our ever increasing range of BACKGAMMON (16k) Play against your computer
Software Hardware Books Magazines. in this version of the popular board game
Keyboards Ram Packs Graphic Roms I/O Ports £5.00
etc. BOTH GAMES AVAILABLE FROM SHOP OR MAIL
Reliable Cassette Player tested for loading/saving ORDER
onZX8l SPECTRUM DRAGON BBC ONLY £18.50
SOFTWARE WRITERS!
SOFTWARE & BOOKS FOR BBC and VIC 20.
IF THE PRODUCT IS GOOD AND THE PRICE IS GOOD SPECTRUM or DRAGON SOFTWARE
RIGHT - THEN MICROWARE STOCK IT! WANTED - EXCELLENT ROYALTIES
STOCKISTS OF DEAN ELECTRONICS and We apologise for delay in sending out catalogues -
D K TRONIG' SUPERB KEYBOARDS I OR ZX81 we are currently re-printing due to much new
AND (SPECTRUM DK TRONICS) stock.
TRADE ENQUIRIES WELCOME OPEN 9,30 - 12 noon 12.30 - 5.30 pm SAE BRINGS CATALOGUE
Closed Monday
ADVERTISEMENT
NEW . . BIGGER ... BETTER
INDEX
Abbes Electronics 2 Hewson Consultants 62
Abersoft 6 Hilderbray 125
Addictive Games I 24 J.K. Grcye Software 84
Adaptors & Eliminators . . . 112 J.S.E 93
Afdec Flcctrnnics. . - 26 Kempston Electronics 12
Lowday Computers 115
We are M O V I N G up the road to Artie Computing
Bi-Pak
90
116 Mcmotech 68 & 69
310 STREATHAM HIGH ROAD Buffer Micro Shop 125 Michael Orwin 116
LONDON SW16 The Butronics Co 26 Microgen 106
Calpac Software 126 Microgame Simulations. . . . 115
Campbell Systems 100 Microsphere 112
Cheetham 126 Micro ware 124
The world's oldest Sinclair orientated software Cobra 33 New Generation Soft 126
Nimrod Software 126
shop packed with goodies for C.C.S 50
Peter Furlong 116
Computer Rentals 93
jJay S-Miarjtfuu
MACHINE
SPECIFICATIONS
ZX80
Immediate mode
The Z X 8 0 will function in the "calculator mode" by immed-
iately executing a statement if it is not preceded with a line
number.
Dimensions Cassette interface
Width 174mm (6.85 in) Works with most domestic cassette recorders. The transfer rate1
Depth 218mm (8.58 in) is 250 baud using a unique tape-recording format. Other
Height 38 mm (1. 5 in ) systems are not compatible with the ZX80's. The Z X 8 0 also
Weight 300g (10.5oz) S A V E s the variables as well as the program on cassette. There-
fore you can save the data for updating next time the program
Microprocessor/Memory is executed. The Z X 8 0 does not support separate data files. The
Z80A 3.25 MHz clock lead supplied with the Z X 8 0 is fitted with 3.5mm jack plugs.
ROM: 4K bytes containing BASIC
Expansion bus
At the rear has 8 data, 16 address, 13 control lines from the
RAM: I K bytes internal, externally expandable to 16K bytes. processor and Ov, 5v, 9 11v, 0 and internal memory control
line. These signals enable you to interface the Z X 8 0 to your
Display own electronics, PlO, CTC, SIO if you want t / O ports etc.
Power supply
Requires an ordinary domestic black and white colour T V . The
The Z X 8 0 requires approximately 4 0 0 m A from 7 — 11 v DC. It
lead supplied connects between the Z X 8 0 and your TV's aerial
has its own internal 5v regulator.
socket. The display organisation is 24 lines of 32 characters
T V standard
per line showing black characters on a white screen. The Z X 8 0
The Z X 8 0 is designed to work with U H F TVs (channel 36)and
does not connect to a printer.
is the version required for use in the United Kingdom. The
Programming
Z X 8 0 USA is designed to work with a V H F TVIAmerican
Programs can be entered on the keyboard or loaded from
channel 2. European channel 3) and is the version required for
cassette. The Z X 8 0 has automatic "wrap r o u n d " so lines of
the American T V system, also for countries without U H F .
program can be any length but not multi-statement lines.
Syntax check
The syntax of the entered line is checked character by char
acter. A syntax error cursor marks the first place the syntax
breaks down if there is an error. Once any errors have been
ZX81
edited out the syntax error cursor disappears. Only syntax Dimensions
error-free lines of code are accepted by the Z X 8 0 . Width 167mm (6.32 in)
Graphics Depth 175mm (6 80 in)
Total of 22 graphics symbols giving 48 x 64 pixels resolution Height 40 mm (1.57 in)
consisting of 10 symbols plus space and inverses. Includes Weight 350 gms (12.15 oz)
symbols for drawing bar charts. Under control of your BASIC
program any character can be printed in reverse field. Microprocessor/Memory
Editing Z 8 0 A 3.25 MHz clock
The line edit allows you to edit any line of program or input R O M : Containing 8K BASIC interpreter
including statement numbers. The edit and cursor control
RAM: I K bytes internal, externally expandable to 16K bytes.
keys are E D I T , R U B O U T , H O M E .
Arithmetic
Keyboard
Arithmetic operators + , - , x , exponentiate. Relational oper-
ators < , > , = , yielding 0 or - 1. Logical operators A N D OR 40 key touch-sensitive membrane. Using function mode and
NOT yielding boolean result. Relational operators also apply to single press key-word system, this gives the equivalent of 91
strings. ZX80 BASIC uses 16 bit two's complement keys and also graphics mode allows an additional 20 graphical
arithmetic ( 1 32767 ). and 54 inverse video characters to be entered directly.
Variables Display
Numeric variable names may be any length, must begin with a Requires an ordinary domestic black and white or colour TV.
letter and consist of alphanumerics. Every character in the name The aerial lead supplied connects the Z X 8 1 to the T V aerial
is compared thus an infinity of unique names is available. socket. The display is organised as 24 lines of 32 characters
String variables may be assigned to or from, shortened but not with black characters on a white background.
concatenated. String variable names are AS — ZS. Strings do not Two mode speeds
require a dimension statement and can be any length. The ZX81 can operate in two software selectable modes F A S T
Arrays have a maximum dimension of 255 (256 elements) each. and N O R M A L . F A S T is ideal for really high-speed computing.
Array names consist of a single letter A - Z . In N O R M A L mode however the Z X 8 1 allows continuously
Control variable names in F O R . . . N E X T loops consist of a moving, flicker-free animated displays
single letter A—Z. Printer
Expression evaluator The 8K R O M will permit instructions ( L P R I N T , L L I S T and
The full expression evaluator is called whenever a constant or C O P Y ) to drive the Sinclair ZX Printer.
variable is encountered during program execution. This allows Programming
you to use expressions in place of constants especially useful in Programs can be entered via the keyboard or loaded from cass-
•E
GOTOs, GOSUBs, F O R . . . N E X T etc. ette. Programs and data can be saved onto cassette so that they
ZX SPECTRUM
Dimensions graphics characters. Also functions to yield character at a given
Width 2 3 3 mm position, attribute at a given position (colours, brightness and
Depth 1 4 4 mm flash) and whether a given pixel is set. Text may be written on the
Height 3 0 mm screen on 24 lines of 32 characters. Text and graphics may be
freely mixed.
CPU/Memory
Colours
Z 8 0 A microprocessor running at 3 . 5 MHz. 16K-byte ROM con-
taining BASIC interpreter and operating system. Foreground and background colours, brightness and flashing are
1 6 K b y t e R A M (plus optional 32K-byte R A M on internal expan- set by BASIC INK, PAPER, BRIGHT and FLASH commands. OVER
sion board) or 48K-byte RAM. may also be set, which performs an exclusive — or operation to
overwrite any printing or plotting that is already on the screen. IN-
Keyboard VERSE will give inverse video printing. These six commands may
be set globally to cover all further PRINT, PLOT, D R A W or CIRCLE
40-key keyboard with upper and lower case with capitals lock commands, or locally within these commands to cover only the
feature. All BASIC words obtained by single keys, plus 1 6 graphics results of that command. They may also be set locally to cover text
characters, 2 2 colour control codes and 21 user-definable printed by an INPUT statement. Colour-control codes, which may
graphics characters. All keys have auto repeat. be accessed from the keyboard, may be inserted into text or pro-
gram listing, and when displayed will override the globally set col-
Display ours until another control code is encountered. Brightness and
Memory-mapped display of 2 5 6 pixels x 1 9 2 pixels; plus one at- flashing codes may be inserted into program or text, similarly.
tributes byte per character square, defining one of eight Colour-control codes in a program listing have no effect on its ex-
foreground colours, one of eight background colours, normal or ex- ecution. Border colour is set by a BORDER command. The eight
tra brightness and flashing or steady. Screen border colour also colours available are black, blue, red, magneta, green, cyan,
settable to one of eight colours. Will drive a PAL UHF colour TV set, yellow and white. All eight colours may be present on the screen at
or black and white set (which will give a scale of grey), on channel once, with some areas flashing and others steady, and any area
36. may be highlighted extra bright.
Sound Screen
Internal loudspeaker can be operated over more than 10 octaves The screen is divided into two sections. The top section — normal-
(actually 1 3 0 semitones) via basic BEEP command. Jack sockets ly the first 2 2 lines — displays the program listing or the results of
at the rear of computer allow connections to external amplifier/
program or command execution. The bottom section — normally
speaker.
the last 2 lines — shows the command or program line currently be-
ing entered, or the program line currently being edited. It also
Graphics shows the report messages. Full editing facilities of cursor left,
Point, line, circle and arc drawing commands in high-resolution cursor right, insert and delete (with auto-repeat facility) are
graphics. available over this line. The bottom section will expand to accept a
16 pre-defined graphics characters plus 21 user-definable current line of up to 22 lines.
ADVERTISEMENT RATES
1. SEMI — DISPLAY or2. LINEAGE
30p per word (minimum 15
(min 2 cm) £7 25 per cm words)
4-11 insertions £6 75 per cm Box Numbers £2.50
12 • insertions £6 25 per cm
Tel No (Day)
Please place my advert In ZX Computing lor months Please indicate number of insertions required
I I
of software including Quantec
data-a/zette® I I
F&P 10% (min. charge £1.50)
Distributors of KAYDE products
C h a r g e m y A c c e s s Visa no.
Signed Name
44, Shroton Street Address
London NW1
Telephone (01)258 0409
| w
' ^ T o . . J N .
" / TIMEQATE H H \ \
' I tgh s p e e d gr-opn«c« combirio'x
with electrifying s p a c e tx
adventure makes TIMEGATE
t h e g a m e o f ail g a m e s
Foil t h e ruling aliens b y
travelling b o c k t h r o u g h t i m e
a n d blasting o u t their h o m e
pienetu F i g h t 3 0 s p a c e b a t t l e s
o n y o u r journey, seeking t h e
t i m e g a t e s t h a t lead t o y e a r
z e r o a n d t h e salvation of t h e
h u m a n race.
Features: 4 0 , High s p e e d
g r a p h i c s , v e r s a t i l e scanning.
^ s t a t u s and battle computers,
land & t a k e - o f f f r o m m a n y
V.
. p l a n e t s , t i m e - t r a v e l . 5 skill
i levels, s c o r e & r a t i n g plus
I f r e e training p r o g r a m .
r v ^ r
vi
t fW
THE CHE86 PLAYER ^ j M J 0 ,
SPEC!
(Who >* ha? D a r e Y O U challenge him? / . M U M SCI
Rsk hign stakes and pit you- wits y QUICK= K «
egamet the cubbs game w t n personality,
speech and devastating chess skills /
w .
4
TME C H E S S P L A Y E R costs loss, i>
wh>le of far-rig you more
•kiU—boosting enjoyment
Features: 6 sk'ii levels. analysis. cop«s
display and an moves t o printer o r
screen, colour o r B S W display, save
ty
game a t any po*"ic.
Personality S speech
SPEAKEASY
A d d speech o r mus>c to you programs!
In response t o mee&ve demand, we have SPACE INTRUDERS W H A T THEY SAY ABOUT
released SF>E AKEASY for yocr- own use i X F e s t u r e s 4 alien t y p e s , CKJR Z X 6 1 G A M E S :
and arnoyment. r a n d o m s a u c e r points, 2 n d QS SCRAMBLE —
Simply record your a o i n d onto a 1. attack wave mutant. " . . . a m a z i n g fantastic!..." [P.C.W.J
cassette and play -t into your- S p e c t r v m v exploding aliens, b o n u s b a s e
via load. The signal may t**«ri be edited O B INVADERS— °
• * * 5 0 , a C D 0 Points, l e f t - r i g h t S
and replayed on command f r o m yot-*~ "...just like t h e real thing!..." | C S V.G.J
fire, s o u n d e f f e c t s a n d colour,
Baac or M / c program, OB ASTEROIDS—
"X^ METEOR STORM
M O E X T R A H A R D W A R E REQUIRED'
\ 3 m e t e o r types, S saucers, "...very g o o d . " "...addictive game..." [C&V.G]
E d w a r d d e B o n o ' s Classic ^Js.fuii screen wrap-around. OS DEFENDER—
L-OAME bonus Ship e v e r y 1 0 . 0 0 0 " . . . B e t t e r t h a n any o t h e r a r c a d e g a m e
Simple rules and complex strategies \ pomts, amazing explosions, I've seen.,." [Syncj
m e k e t n a L - G A M E an essential for ^ l e f t - r i g h t - t h r u s t - f ire S
everyone
hyperspece. sound effects " rue e s t g a m e s I've p l a y e d o n t h e Z X S 1 .
/ " " ^ / " A lalso
a 0 rrcJudas
o u o o s Outstanding
Outstanding and and compkJfwe
r (f vwr&nrm
vw&oos ofr\f Mastermind &KPontoon
F ^ Nv and speech All t h e t a p e s w e r e i m p r e s s i v e l y packaged..."
As featured onT.V.m Edward da Bono's [Which M i c r o £ S.R |
/ Thnkmg Course. \
r U - G A M E RE ACMES THE BITS O T H E R
/ GAMES DON'T TOUCH! , -V
/V
C O M E A N D SEE OUR A M A Z I N G R A N G E AT:
T H E M I D L A N D C O M P U T E R F A I R {28ih - 30th April)
Sand order toi QUICKSILVA, DEPT SPz , 8S NORTH AM ROAD, SOUTHAMPTON, BOS ORB