Games for your msx

Page 1



GAMES FOR YOUR MSX By Graham Carter



GAMES FOR YOUR MSX By Graham Carter

Virgin Books


First published in Great Britain in 1985 by Virgin Books Ltd, 328 Kensal Road, London W lO 5X]. CopyrightŠ 1985 Interface/Virgin Books ISBN 0 86369 092 0 All rights reserved. No part of this book may be reproduced in any form or by any means without prior permission from the publisher. Printed and bound in Great Britain by Richard Clay (The Chaucer Press) Ltd, Suffolk. Production services by Book Production Consultants, Cambridge. Illustrations and artwork by Sue Walliker. Typeset by Keyline Graphics. Distributed by Arrow Books.


1

ll l l l l l l l ll :

GAMES FOR YOUR MSX

: l l l l lll lll ll

TO SUE AND STEVE POWELL


1

1 1 1 1 1 1 1 1 1 1 1:

GAMES FOR YOUR MSX

: 1 1 1 1 1 1 1 1 1 11 1

TIM HARTNELL-THE SERIES EDITOR

Tim Hartnell is the most widely-published computer author in the world. Founder of the National ZX Users' Club, and founding editor of ZX Computing magazine, Tim has been involved over the years in a wide variety of computer activities. His published works include The Personal Computer Guide (Virgin Books) and The Giant Book of Computer Games (Fontana). G�CARTER-THE AUTHOR

Graham Carter is a 20- year -old student in his final year of a B/TEC National Diploma course in Computer Studies. He is hoping to go to University to continue his studies in this field to degree level. He has b een working with computers for over four years. His other interests include music and photography. SUE WALLIKER-THE ILLUSTRATOR

Sue Walliker is a freelance illustrator. ACKNOWLEDGEMENTS

I would especially like to thank Andrew Ogilvie and

Carol Vincent for the original programs they supplied for use in this book, and for the help they gave me during its preparation. I would also like to thank Paul Precious, Simon Gould, Scott Vinc ent, Clive Gifford, Damon Pillinger and Danny Olesh for their program ideas.


1 11 1 1 1 11 11 1:

: 1 1 1 1 1 1 1 1 1 11

GAMES FOR YOUR MSX

Contents Editor'sIntroduction...

ll

Author'sIntroduction ProgramNotes

13

........................................

. . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . .

.....................

15

MotorcycleStuntman .

17

Mastercode...............

22

Noughts& Crosses .. .

.

..................................

26 30

Bazooka! .................. . MusicProgram

34

Hangman. .

37

Breakball.... .................................................................. . DartsScorer ............................ .

44

. ................................................................... 47

Minefield................................... .

51

Calendar .................... .

55

·······················

57

Nim............................ .

63

21

.

.. ....

.................. ...... 66

Inferno ....................... . Allsorts. . . . . . ................... ................... ....................

70

NightFighter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StockMarket. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

WaveForm .

................................

72 75

. ............... ..................................... 79

TelephoneBook .. .... GraphicsDemonstration

........................................

...........

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

...................

81

........................... .................................... ...................

Graphics .. . . . . . . . ..... . . . . . . . . . . . . . . . . .

..

. . .. . . . . . . . . . . . . . . . .

...

82

.. . . . . . . . . . . . . . .

84

Time'sEye.................................... ................................... ................. . .

85

3DHat

87

Eye.

...............................................................................................

How toWriteBetterPrograms........ .......................... . . Glossary.. Bibliography

89 93

... 99 ............ 115



I

11111111111:

GAMES FOR YOUR MSX

: 1 1 1 1 1 1 1 1 1 111

Editor's Introduction Typing in a computer program is like opening an unknown door. You do not know until you actually open the door - or, in our case, run the program - what experience is waiting for you. Of course, the sign on the door has given you some indication, but nothing can equal first-hand experience. You do not know precisely what experiences are waiting for you in the great programs in this book. Of course, if the introduction says you're entering a space game, it's very likely the program won't play 'Guess My Number' when you get it up and running. But the listing rarely hints at the computer's game-playing strategy, ,or the screen display, or the fun that is waiting for you. This book has a number of unknown doors - doors leading into outer space and into the fiendish worlds of computer intelligence, wizards and Adventure. We've provided the doors . . . and the keys. All you have to do to turn the lock is type in the program, and run it. Whatever you find behind each door, I guarantee you won't be disappointed. Tim Hartnell January 1 985

ll



1

lllllllllll:

GAMES FOR YOUR MSX

: 1 1 1 1 1 1 1 1 1 1 11

Author's Introduction The programs in this book will work on any of the new range of MSX computers. Many of them use the ad足 vanced colour and graphics facilities offered by MSX BASIC to add interest and realism to the games. They are a mixture of arcade games, strategy games and gambling games. Contained within the listings are many REM state足 ments to explain the purpose of each block of code; by reading through the programs you may see routines which you will want to incorporate in your own pro 足 grams. In particular, the 'Mastercode' and 'Hangman' games contain useful string handling routines for validat足 ing user inputs. I have tried to make the most of the commands available on the MSX machines when writing these programs, and to demonstrate just how quickly the machine works. I hope you enjoy typing the programs in and playing them - once you have RUN a program a few times, don't hesitate to change it if you think it can be improved upon. Graham Carter January 1 985

13



1

1 1 1 1 1 1 11ttR

GAMES FOR YOUR MSX

: 1 1 1 1 1 1 1 1 1 11 1

Program Notes These programs should be typed in exactly as they appear in this book They have been specially printed so that the listings reproduced here are identical to the way they should look on your television screen. Some of the listings contain special graphics charac足 ters. There is a diagram in the manual supplied with your machine which shows where these graphics characters are on the keyboard, and which keys you must press to obtain them.

15



I

11111111111:

MOTOR CYCLE STUNr MAN

: 1 1 1 1 1 1 1 1 1 11 !

MOTORCYCLE STUNT MAN In this game, it's on with your crash helmet and away you go. Your object is to jump over a line of buses, which change in number randomly every game. Press any key to start, and watch your speed increase at the top of the screen. When you think that you have sufficient speed to clear the line of buses, release the bike's brakes by pressing the ' 1 ' key and see your bike fly over the ramps. This game uses accurate formulae for thrust and velocity. If you want the speed to increase at a lower rate, just change the loop in line 380 a number greater than 15 will make the speed increase more slowly, while a number less than 1 5 will make the speed increase more rapidly. -

17


I

1 11 1 1 1 1 1 1 1 1 :

: 1 11 1 1 1 1 1 1 11 1

G AMES F OR YOUR MSX

10

REM

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

20

REM

* Mo t o r c y c l e

Stunt man *

30

REM

* S·

V i n c en t

and

*

40

REM

*G .

C ar t e r ,

1 98 4

*

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

50

REM

60

SCREEN

70

KE Y

80

COLOR

1 4, 1 , 1

90

W I DT H

38

0

OFF

1 00

REM

1 10 1 20

REM * * * * * * * * * * * * * * P R I N T T A B < 1 0 ) ; " M o t orc y c l e

* I n s t r u c t i on s * Stunt ma

n" ,..., 11

1 40 nd

LOCATE

1 50

P R I NT

t h at 1 60 f

0 , 4 : PR I NT " P r e s s y ou r s p eed "

watc h

" i n c rease .

an y

ke y

W h en

y ou

t h i nk

c l ear

the

l i ne

a

y ou r " PR I NT

" b i ke

wi l l

o

b us e s , "

1 70 se

PR I NT

" p ress

the

'1'

ke y

to

re l e a

the"

1 80

P R I NT

1 90

P R I N T : PR I NT

" b i ke's

b r akes . "

" Pr e s s

an y

ke y

to

t i n ue . " 200

I< $ = I N�< E Y $

210

IF

220

SCREEN

K $= " "

THEN

230

COLOR

9 , 1 , 1

240

GOSUB

1 1 10

250

X =RND < -T I ME >

200

1 : W I D TH

30

260

B U S = R N D < 1 > : BU S= I N T < B U S * 1 7 ) +2

270

SCREEN

280

WID T H

30 760

290

GOSUB

300

REM

310

M=0

320

LOCATE

*M

1

is

s p eed *

1 1 , 1 : PR I NT

18

"0

M .P .H . "

c on


I

11111111111:

: llllllllllll

MOTOR CY CLE STUNTMAN

330

IF

340

REM

INK E Y $ = " " *+

THEN

350

REM

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

sp eed

330

unt i l

1

k ey

360

K $ =INKE Y $

3 70

R = R N D < 1 > : M = M + 5 +INT < R * 6>

380

FOR

390

IF

X= 1

TO

1 5 : NE X T

M > 1 70 THEN

400

L O C ATE

410

IF

X

M = 1 70

1 1 , 1 : PR INT

K$< > " 1 "

THE N

M ; "

420

MP=M Z = R N D < 1 > : Z = I NT < Z * 1 1 > M = M + < Z-5 ) - 4 0

450 460

M . P.H "

360

430 440

p re s s e d *

J = 9 + INTCM / 7 . 5 +.5 ) M< - 5 THE N J = 6

IF

4 70

REM

* P l ot

480

REM

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

490

FOR

N= 1

500

PUT

SPRITE

510

NE XT

520 530

PUT PUT

c yc l e

TO

on

s c reen *

4 0 , < < B * N> + 7 , 7 4 > , 1 3 , 0

N SP RITE S P R ITE

540

IF

550

FOR

N = 7 TO SPRITE

0 , < 47 , 67 ) , 1 3 , 0 0 , ( 5 5 , 60 ) , 1 3,0

J=6 THEN

J

580

560

PUT

5 70

NE X T N

0 , < < N * 8> + 7 , 60 ) , 1 3 , 0

580

PUT

SPRITE

0 , < ( ( J + 1 > * 8> +7 , 6 7 ) , 1 3 ,

PUT

SPHITE

0 , < < ( .J + 2 ) * 8> + 7 , 7 4 ) , 1 3 ,

0 590 0 600

IF J < > BU S + 7 T H E N 8 9 0

610

REM

* P l ot

620

REM

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

630

FOR

N = J + 3 TO

640

PUT

S P R ITE

6 �i 0

NE X T N

660

FOR

6 70

L O CATE

X=1

680

CLS

690

L O C ATE

TO

b i ke ' s

l an d i n g *

31

0 , < <N * B> +7,74 ) , 1 3 , 0 1 00 0 : NE X T

3 1 , 1 0 : P RINT 1 1 , 4 : PR INT

19

"

X "

" Great

ju m p ! "


i

11111111111: 700

LOCATE

US ; " 710 ; ,,

2.,6 : PR I NT

b uses •

F' H •

720

FOR

730

GOTO

" Y ou

c l eared

" ;B

at "

L OCA T E

M

: 11 11 11 11 1 111

X GAMES FOR YOUR MS

6 ., 8 : PR I NT

"a

s p eed

of

" ;MP

,,

X= l

TO

2 0 0 0 : NE X T

X

260

740

REM

* Se t

750

R EM

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

up

sc reen *

760

CLS

770

LOCATE

0 ., 1 1 : PR I NT

S T R I NG $ ( 29 ., " r"' " )

780

LOCATE

5 ., 1 0 : P R I NT

" ..···

: PR I NT

..

-·-

·

" : LOCATE

6 .,9

"

790

FOR

800

LOCATE

N= 7

810

NE X T

820

LOCATE

TO

BUS+6

N ., 1 0 : P R I NT

"A "

N " \ " : LOCATE

BUS + 8 ., 1 0 : P R I NT " . .-. "

BUS + 7 ., 9 : P R I NT 830

REM

* Put

840

R EM

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

b ike

on

l ef t

8 50

PUT

SPR I TE

860

R E TURN

870

REM

*D i dn ' t

R EM

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

890

F OR

F= 1

900

L OCAT E

2 , 1 8 : PR I NT 9 1 0 NE X T F 920

FOR

930

CLS

ma k e

it*

10

.] + 2 ., 1 0 : PR I NT "

X=1

"

" : LOCATE

TO

1 00 0 : NE X T

X

940

REM

* C l ear

Spr i t e

PUT

SPR I T E

0, < 0 ., 20 8 > ,0,0

960

IF REM

980 st

J < BUS + 7 * Too

LOCATE and

THEN

sc r e e n *

1 04 0

f ast *

3 ., 4 : PR I NT

" Y ou

wen t

4 ., 6 : F'R I NT

" m i ssed

t oo

fa

you "

990

LOCATE

i ng

ramp . "

1 00 0

.]+

"

950 9 70

s c reen *

0 ., < 7 ., 78 > ., 1 3 ., 0

880

TO

of

LOCATE

7 ., 8 : PR I NT

p eed . "

20

" Try

a

the

l an d

s l ower

s


I

11111111111: 1010

F O R- X = 1

1 020

GOTO

*Too

1 030

R EM

LOCATE

1 050

and

TO

1 50 0 : NE X T

X

260

1 040 l ow

: l l l l ll l l l ll l

MOTOR CY CLE STUNT MAN

s l ow *

1 , 4 : F'R I NT 1 ':!fOLlr 1

LOCATE

11b i k e

3 , 8 : F'R I NT

11 T r y

1 50 0 : NE X T

1 07 0 1 08 0

F OR X = 1 T O G O TO 2 6 0

1 09 0

REM

* De fi n e

1 1 00

R EM

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

1 1 10

R $ = . . .. N= 1

TO

t oo

wen t

5 , 6 : PR I NT

e - o f f . .. 1 0 6 0 L OC A T E n ew b i k e . . .

. . Y ou

is

a

ag a i n

wr i t on

X

g rap h i c s *

8

1 1 20

FOR

1 1 30

READ

1 1 40

R $ = R $ +C H R $ < VA L < D $+ "/." ) )

[1$ N

1 1 50

NE X T

1 1 60

S F' R I TE $ < 0 > = R $

1 1 70

R E T UR N

1 1 80

DAT A

1 1 90

END

32 , 96 , 80 , 1 1 0 , 50 , 8 2 , 1 8 1 , 66

21

s

a


I

lllllllllll:

GAMES FOR YOUR MSX

: l lll l l l l l l l l

MASTER CODE This is the game where yo-:.1 must guess a sec ret code which has been generated by the computer. Full instructions are included in the program. There are some useful validation routines in lines 620-820 which you may wish to expe riment with in the programs you write yourself.

10 REM **Mastercode Program** 20 REM *G . P . Carter, 1984* 30 REM *Instructions* 40 KEY OFF:SCREEN 0:WIDTH 39 �i0 CLS 60 70

PRINT TAB ( 1 5 ) ; "Mastercode" PRINT TAB ( 1 5 ) ; "******* ** * 11

80 PRINT:PRINT 90 PRINT "In this game, the computer thinks of a" 100 PRINT ••four digit number-· which yo 11 u must The code is made u 110 PRINT "guess. p from the11 120 PRINT 11digits 0-9., and each digit is used • ' 130 140

PF:INT PRINT

110nce only."

1�i0 PRINT "Enter-· your' guess by typing in a four" 160 PRIN'T "digit number-· with no space s in between" 170 PRINT "the digits; then press 'F:E TURN 180 PRINT"The computer will then give I

11

you clues��

22


I

1 1 1 1 1 1 1 1 1 1 1: 1 90

PR I NT

was

to

''a s

to

h ow

c l ose

200

PR I NT

P R I N T : PR I N T : P R I N T

g uess

" sec ret

c od e . " " Press

;R E T UR N'

c o n t i n ue . "

220

I NP U T

230

CLS

240

PR I NT

250

PR I NT

the 260 j.n

y ou r

the"

210 to

: 1 1 1 1 1 1 1 11 1 1 1

MASTER CODE

A$

" The

P R I NT t he

270

WH I T E

sc ore

rep r e sen t s

d igits

wh i c h

were

n u mb er " " of

used

c od e "

PR I NT

" b ut

were

in

the

wrong

p os i

" T he

BLACK

sc ore

r e p r-·esen t s

d ig its

wh i c h

were

t i on s . " 280

PR I NT

290

P R I NT

the

n umber "

300 PR I NT " of e t a n d were " 31 0 320

F' R I N T

PR I NT

i l l

t ell

340

PR I NT

to

3:i0 360 to

the

c o r r· e c t

" At

the

end,

p os i t i on . "

PR I N T

330

d

" in

c or r e

the

c om p u t e r

w

'.:iou " " h ow

man y

g uesses

"the

an s w e r . "

y ou

neede

f i nd " PR I NT

P R I N T : PR I NT : F'F� I N T

" Pr e s s

'R E T U R N'

c o n t i n ue . "

370

I N PU T

380

REM

A$

390

REM * * * * * * * * * * * * * * * * * * * *

* Creat e

sec ret

c od e *

400

DIM A <4>

410

FOR

420

B=RND

4 30

X= R N D ( 1 ) : X= I NT < 9 * X ) + 1

E = l.

T O 4· < - T I ME >

440

REM

* Chec k

4 50

REM

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

460

FOR

J= l

470

IF

TO

X=A(J )

dig its E THEN

400

23

are

d i f f e re n t *


I

1 1 1 1 1 1 1 1 1 1 1: NE X T

A<E > = X

500

NE X T G=0

: 1 1 1 1 1 1 11 1 11 1

.]

480 4 90 �i 1 0

GAMES FOR YOUR MSX

E

52 0

REM

*G

530

REM

* S t art

540 550

REM CLS

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

5 60

P R I NT

c ou n t s

g ue s se s *

g a me *

" G u e s s : " ; T A B< 1 0 > ; . . Wh i t e : " ; T

A B<20 > ; " B l ac k : .. 570 58 0 re

. . _____ ., ; T A B < 1 0 ) ;

PR I NT

( 20 ) ;

.. _____ ..

LOCATE

l l _____

1 , 2 1 : P R I NT

11 E n t e r

1 , 2 2 : P R I NT

11 8$

a

.. ; T AB

4

f i gu

dig its

o n ly

g u e s s . ..

�590

LOCATE

11

600

LOCATE

1 ,2 2 : I NP U T

610

LOCATE

1 , 2 0 : PR I NT

620

IF

11

11 630

LEN ( B$ ) =4

LOCATE P l ease

THEN

650 PR I NT 11 4

1 , 20 : en t er' a g a i n . . .

64 0

GOTO

650

REM

* Chec k

�i90

660

REM

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

670

Z =V AL<B$ )

680

IF

690

LOCATE

Z < >0

0-9

on l y ;

i nput

THE N

is

710

1 ,2 0 : P R I N T en t e r

n um e r i c *

11 E n t r y

must

be

ag a i n . "

700

GOTO

710

LOCATE

59 0

720

REM

* Ar e

730

REM

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

740

FOR

8= 1

750

FOR

T=S+ l

7 60

IF

1 , 22 : PR I NT 11 n os TO

in

g uess

d i f f e r en t ? *

4 TO

4

M I D$ ( B $ , S , 1 > = M I D $(B$ , T , 1 >

F= 1 770

..

NE X T

T

24

THEN


I

1 1 1 1 1 1 1 1 1 1 1: 780

NEXT

790

IF

800

LOCATE

t

be

: 1 1 1 1 11 1 1 1 1 11

MASTERCOD E

S

F=0

THE N

830

1 .,20 : F'R I NT

11A l l

di g i t s

mus

d i f f e ren t . ��

810

F=0

820

GOTO

830

L OC A T E

840

REM

* Se a r c h

850

REM

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

860

R=0 : C=0 : G=G+l

580 1 ,G + 2 :

870

FOR

880

X= A S C(B$ ) - 4 8

890

IF

900

FOR

D= 1

X=A < D > .J= 1

910

IF

920

NEXT

930

TO

P R I NT

f or

THEN

C=C+ 1

4 T HE N

.]

& WH I T E *

4

TO

X= A(J )

B$

BLACK

R=R+l

B $ =M I D$(8$,2 , < L E N(B$ ) ) ) D

940

N EXT

950

IF

C=4

960 REM

THE N

*If

al l

1 04 0 4

are

b l ac k

go

to

end

* 97 0

REM

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

* b l ac k

& w h i te s c o r e s *

980

REM

* Pr i n t

990

R EM

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

1 0 00

LOCATE

1 0.,G + 1 : P R I NT

1010

LOCATE

2 0., G + 1 : P RINT

1 030

GOTO

1020 F'R I N·r

580

1 04 0 L O C A T E t h e c ode i n 1 050 END

1

11

.,

G+:i: P F � I I\IT

; G ; 11

g oe s

25

..

11

R-C

C

1 1 You

g uessed


I

11111111111:

GAMES F OR YOUR MSX

: 1 1 1 1 1 1 1 1 1 1 1!

NOUGHTS & CROSSES This game, by Andrew Ogilvie, allows two people to play 'Noughts and Crosses' on the television screen. The computer gives a display of the board and will tell you when either player has won. Full instructions for playing the game are included in the program.

26


I

1 11 11 1 1 1 1 1 1 : 10 20

REM REM

: 1 1 1 1 1 1 1 1 1 11 1

NOUGHTS & CROSSES

**************** * ******** * N o u g h t s. & C r o s s e s *

30

REM

*

Da t e :

40

REM

*

A n d rew

50

REM

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

60

REM REM

*

80

DIM

90

REM

A <9 > , A $ ( 9) * P ro g r a m S t a r t

1 10 120 1 30 140

KE Y

Arra y s

CLS W I DT H

39

A=0 REM

*

FOR

I=l

Z er o i se TO

Arra y s

170

A< I > = 0 : A $ ( I ) = " NE X T

"

I

1 90

REM

200

LOCATE

1 6,0 : P R I N T

210

LOCATE

2 ., 2 : P R I N T

and

240 s i de

*

Pr i n t

Crosses , LOCATE

tel l

y ou

I n s t ruc t i on s

f or

" *

*

OXO

" Th i s

*"

is

b oa r d LOCATE the

2 , 4 : P R I NT is

" of

y ou

2 , 5 : P R I NT

" as

on

has

won .

the

LOCATE

3 ., 7 : P R I NT

" l l2l3 "

LOCATE

3 , 8 : PR I NT

" ----- " " 4l5l6 " " ----- "

270

LOCATE

3 ., 9 : P R I NT

280

LOCATE

3 , 1 0 : PR I N T 3 ., 11 : P R I NT

290

LOCATE

300

L O C A T E 10 ., 1 l : P R I N T

l ef t

" 7l8l9 " " Just

en t er

th

1 -9 . "

310

L O C A T E 11 ., 10 : PR I N T

320

C0= 0

11

wi l l

sc reen . "

250

p os i t i on

I

n um b e r e d "

260

e

Noug h t s

t wo "

2 , 3 : P R I NT " p l a y er s . wh en e i t h er "

LOCATE

of

*

9

180

The

*

C O L O R 15 ., 4 ., 4

15 0

230

*

OFF

160

220

* *

Og i l v i e

70

1 00

D i me n s i on

07 / 1 1 / 84 J .

3 3 0 L O C A T E 1.,2 0 : PR I NT

27

" X

g oes

" Pr e s s

f i rs t .

< RETURN >


I

11111111111: to

: 1 1 1 1 1 1 11 1 11 1

GAMES FOR YOUR MSX

c on t i n u e . " ;

34 0

I NP U T

350

PL$= " X " : V 1 = 1 : W2=3

A$ : C L S

360

LOCATE

37 0

REM

*

1 6 , 0 : F'R I NT E n t er

380

LOCATE

390

P R I NT

go

"*

OXO

* "

*

2 ., 2 S P C < 1 5)

400

LOCATE

410

P R I NT

2 ., 2

420

A $ = I NKE Y $ : I F

" P l a y er

" ; PL$ ; " A $ = " ''

y ou r

THEN

go :

" ;

420

4 3 0 A = VA L<A$ ) 440 er

IF

A=0

1 -9

THEN

LOCATE

o n l y . " : GO T D

450

IF

460

C O = C O +l

A< l

OR

470

REM

A >9

* Ch e c k

to

2 ., 4 : PR I NT

" En t

37 0 A: I : GO T O

THEN see

if

p l ac e

440 t a k en

* 480

IF

A <A > < >0

" Can ' t

go *

THEN

LOCATE

t h ere! " : GO T O

490

REM

500

A:t<A > =P L $

Pr i n t

510

A<A > = V l

520

LOCATE

; •• : .. ; A$ ( 3)

g ame

2 , 4 : P R I NT

370

b oard

*

28.,8 : F'R I NT

A$ ( 1 ) ; " : " ; A$ ( 2) "------��

530

LOCATE

28 ., 9 : PR I NT

540

LOCATE

28., 1 0 : PR I NT

A �: <4 > ; " : " ; A $ ( 5

) ; " : " ; A$ ( 6 > 550

LOCATE

28., 1 1 : PR I N T

.. ________ ..

560

LOCATE

2 8 ., 1 2 : P R I N T

A $ ( 7 ) ; " l " ; A$ ( 8

) ; " : " ; A $< 9) 570

REM

580

IF

A< 1 > + A(2)+A<3 > = W 2

*

Check

f or

win

* THEN

720

590

IF

A<4 > + A <5 > +A<6 > = W 2 -T H E N

720

600

IF

A<7 > + A <8 > +A<9 > = W 2

THEN

720

610

IF

A < 1 > + A< 4 > +A<7 > = W 2

THEN

720

62� I F

A <2 > +A<5 > +A<B > = W 2

THEN

720

630

A<3 > + A <6 > + A <9 > = W 2

THEN

720

IF

640

IF

A< 1 > + A ( 5 ) +A<9 > = W 2

THEN

720

650

IF

A <3 > + A ( 5 ) + A<7 > =W 2

THEN

720

28


I

NOUGHTS & CROSSES

1 1 1 1 1 1 1 1 1 1 1: 660

IF

670

REM

*

No

680

REM

*

Swap

690

IF

OTO

710

C0=9

THEN

Vl=l

800

win n in g

l in e

p l a yers

THEN

: 11 11 1 1 1 1 1 1 11 *

*

V 1 =5 : PL $= "0" : W 2 = 1 5 : G

700

V 1 = 1 : PL $ = " X " : W 2 = 3

710

GO T O

720

REM

730

LOCATE

740

P R I NT

7 50

LOCATE

760

I NP U T

770

IF

780

P R I NT

370 *

P l a y er

h as

won

*

2 , 14 1 1P l a y er

" ; PL$ ; " h as

won! "

2 ., 1 6 11An o t h er

g o <Y >

L E F T $ <A$ , 1 > = " Y 1 1 ..

11 ; A$

THEN

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

90

Bye

-

Bye

*

*************" 790

GO T O

800

REM

840 *

810

The

LOCATE d r a w! . .

820

P R I NT

830

GOT O

840

END

g a me

is

2 ., 1 2 : PR I NT

750

29

a

d raw

"T h e

*

g ame

is

a


1

11111111111 :

GAME S FOR YOUR MSX

: 11111111111!

BAZOOKA! You lie in wait behind a pile of sandbags, with your anti­ tank gun loaded and ready for use. An enemy tank appears on the horizon, but there is a large wall in your line of fire. You raise the turret of your gun and fire! The shell arcs over the wall and penetrates the tank' s armour, turning it into a mass of mangled metal. There is little time for praise, however, as another tank comes into VleW. In this game you must judge the angle and velocity for the shell to clear the wall and hit the tank. The shell's course is plotted according to accurate formulae as it hurtles towards the tank. •

30


I

11111111111 : 10 20

REM REM

************ * B azoo k a ! *

30

REM REM

* �������� * * G . Cart er , *

40 50

REM

* S·

60

REM

*

70

REM

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

80

KE Y

OFF

90

COLOR

1 00

:111111111111

BAZOOKA!

V i n c en t * 1 98 3 / 84

*

2 , 15 , 15

CLS

1 10

REM

* I n i t i a l i se

1 20

REM

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

v ar i ab l e s *

1 30

B = R ND <-T I ME >

1.4 0

TR Y =0

1 50 1 60

A $ = S T R I N G $ (3 2 ., .. 1 1 ) W A L L = R ND< l > : WA L L = I N T < 1 8 * WA L L > +5

1 70

HGT = RND< l > : HG T = I NT <6 * HGT > + 3

1 80

T N K = W A L L + 2 + I N T <R ND< 1 > * <2 7 - W AL L ) )

1 90

REM

* Pr i n t

200

REM

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

tank *

210

LOCATE

T N K , 1 9 : P R I NT ��-- . .. : LO C A T E 1 1 / ++ \ 1 1 : L O C A T E T N K , 2 1 : P R I

T N K , 20 : F'R I N T NT 1 1 \00/ 1 1 220

REM

* Pr i n t

230

REM

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

240

FOR

A= 1

250

LOCATE

260

NEXT

270

REM

280 R E M 290 300

HGT

WALL , 22-A : PR I NT

1 1 :A,C1 1

A * Pr i nt

B a zo o k a *

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

LOCATE

1 : F'R I N T

TO

wa l l *

1 , 2 0 : P R I NT

. . _,, : L O C A T E

0 ,2

" . ) ..

LOCATE

3 , 8 : PR I NT

" En t er

ang l e

of

p r o j e c t i on . . 31 0

I NP U T

320

IF

330

LOCATE

340

ANG

A NG < 1

OR

ANG >90

LOCATE

1 , 2 0 : P R I NT " 0 , 8 : PR I NT A$

350

LOCATE

0 , 9 : PR I NT

360

REM

* De c i d e

on

THEN 3 1 0 11

A$

shape

31

of

b ar r e l *


I

11111111111:

:11111111111 1

MSX GAMES FOR YOUR

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

370

REM

380

IF

ANG > 1 0

T HE N

390

IF

A NG >33

T HEN

X =3

400

IF

ANG > 5 5

T HE N

X =4

410

IF

A NG > 7 7

T HEN

X =5

420

REM

* Pr i n t

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

X =2

b ar r e l *

430

REM

440

LOCATE

1 , 20

4 50

IF

X=l

T HE N

��-��

P R INT

ELSE

IF

X=

THEN P R INT ��-•" E L S E I F X =3 T H EN P R 11 INT .. .. .. E L S E P R INT .. . 4 6 0 L O C A T E 6 , 8 : P R INT .. E n t er s h e l l v e l

2

o c i t y .. VEL

4 70

INPU T

480

IF

4 90

TR Y =TR Y + 1

4 6 0.

T HEN

VEL < 1 0

500

V E L = VE L / 4

510

LOCATE

520 530

REM

0 , 8 : P R INT A $ * Ca l c u l a t e p a s .

REM

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

54 0

ANG = ANG * 3 . 1 4 1 59 / 1 80

550

H R = CO S <ANG > * V E L

56 0

R E V = SIN<ANG > * V E L

570

V=0 : W=0 : T=0

580

Y = 2 +<HR * T >

590

X = 1 8 - INT

600

IF

X <0

T HE N

LOCATE

610

IF

X <0

T HE N

690

of

m i ss i l e *

<RE V * T - 4 . 9 * <T * T > > W , V : PR INT

11

6 2 0 IF Y >3 1 T HE N 8 0 0 630 IF X > 2 1 T HE N X = 2 1 6 4 0 R E M * Pr i n t m i ss i l e * ***************

650

REM

660

LOCATE

670

LOCATE

680

V = X : W= Y

690

T=T+ . 2

700

REM

7 1 0 REM 720

IF

Y , X : PRINT W , V : PR I NT

* Ca l c .

w h ere

" * 11 11 1 1

m i ss i l e

l an d s *

*************************** X >20

T HE N

750

32

11


I

11111111111 : 730

IF

Y >= W A L L - 1

=2 1 -HGT

THEN

740

GOTO

750

LOCATE

760

IF

770 he

AND

Y < = W A L L+ l

AND

X>

750

�i80 W,V : P R I NT

X > 20

LOCATE

THEN

"

"

790

5,8 : P R I N T

" Oops !

y ou

hit

THEN

890

t

wa l l "

780

GOTO

790

IF

800

LOCATE

820

Y >= T N K

AND

Y< = T N K + 4 " 11

W,V : PR I N T

810

LOCATE

9 ., 8 : P R I N T

820

LOCATE

4 ., 1 0 : PR I N T

try 840

ag a i n " Z $ = I N KEY$: I F Z $= 1 1 1 1 T H E N

850

LOC A T E

1 ., 1 9 : F'R I NT

860

LOC A T E

0,8 : P R I N T

8 30

R I NT 870

:111111111111

BAZOOKA!

1 1 You m i ssed i t " 1 1 H i t an y k e y t o

830 "

"

A$ : LO C A T E

0., 1 0 : P

A$ LOC A TE 0 ,9 : P RINT

880 GOTO

A$

290

890

FOR

9 012t

LO C A T E T N I<+l. ,20 :PH I N T

N= 1

TO

T N K + l ,20 : P R I NT 910

NE X T

920

CL.S

N

15

.,

.��

930 LOC A T E 4,8 : F'R INT a t t o ok y OU1 1 940

LOC A TE

9�i0

IF

" Great

1 2 , 1 0:P R I N T

I NT

T R Y= 1 " g oes. 1 1

96121

EN D

T HEN

PR I NT

33

.. .

11 : LO C A TE

sh o t

T RY; 1 1 90 . "

-

th

EL S E

PR


I

lllllllllll:

GAMES FOR YO UR MSX

: l lllllll l l l1

MUSIC PROGRAM One of the best features of MSX machines is the music processor which allows you to play tunes in three-part . harmony. This program demonstrates just how good the sound facilities are. As it is very repetitive to type in this listing, it is helpful to program one of the keys at the top of the keyboard to cut down on the amount of typing when entering this program. To do this, type: KEY l , "PLAY "+CHR$(34). Then, each time you press key F l , the start of a line of code will appear on the screen for you to complete. If you use the 'AUTO' command as well, the computer will provide line numbers automatically.

34


I

1 1 1 1 1 1 1 1 11 1 : 1 0 REM 20 REM 30 40 50

: 1 1 1 1 1 1 1 1 11]

MUSIC PROGRAM

Jo-Jo J'Mu s i c P r og r a m Jo

REM REM REM

60 70 80

Jo�� � � �� � ���� ��Jo J'Gr a h a m C a r t erJo Jo�Jo P L A Y 11 t 1 2 0 11 , 11 t 1 20 11 , 11 t 1 20 11 P L A Y 11V 1 1Zlo5 1 4 11 , 11V8o4 1 4 11 , 11V8 o2 1 4 11 P L A Y 11 e - o4 b - g 11 , 11 g e - o3b - 11 , 11 e - 1 2b - 11

9 0 P L A Y 11 f # o5 1 2 d 11 , . . o4 d o5 1 8 c o4 1 8b - a a - 11 , 110 1 1 4 b - o4 1 8 a - g g - f 11 1 00

PLAY

1 10

PLA Y

1 20

PLA Y

110�i l 4 11 , 110 4 1 4 11 , 1102 1 4 11 11 e - o4 b - g 11 , 11 g e--·o3b - 11 , . . e - 1 2b - 11 11 f # o5 1 2 d 11 , 1104 d o5 1 8c o4 1 8b - a a ­

. . , . . o 1 1 4b - o4 1 Ba - g g - f 11 1 3 0 P L A Y 11 l 4 c o4 b - o5 d 11 , . . 1 4 g l 2 d 11 , . . D2 1 4 e - b - o3 g . . 1 4 0 P L A Y 11Co4 b - g 11 , . . 1 4 e - d d - " , .. o2 e - b - o3 e- ..

1 �i 0

P L A Y.

1 60

PLAY

1 70

PLA Y

11 1 2 e - . 11 " o3 b --g a - . . , 11 o2 1 2 a - . 11 ., 11 g 11 , 11 o4 c c # d 11 , 11 b - 11 11 l 4 b -·o5 c d 11 , 11 e - 1 2 e - . . , 1'l4go3 1 2

PLA Y

. . f e - e .. , 11 1 4 b - b - a " , " 1 4 o2 g o3 g o2

PLA Y 1 4o3d - e 11

1104 a - . o5 1 8c o4 a - g 11 , 11 R 4 c d - 11 , 11 f

b - 11 1 80 g - 11 1 90

11 1 2 f . . . , .. r 4 c c 11 , . . o2 f o3d e - 11 11 l 4 b - ao�i l 8 d o4 b - a 11 , 11 r 4 d e - 11 , 110 2 1 0 PLA Y 11 2 1 2 g o3 1 4 f # 2 2 0 P L A Y 11 1 2 g . . . , .. g d - c 11 , 11 o2 1 4 g o3 f e 11 200

PLAY

230

PLAY

240

PLAY

1 2 f 11

. . t 1 1!:i 11 , . . t 1 1 5 " , 11 t 1 1 5 11 11 l 8o5 c d l 2 f 11 , " a --o4 d c " , 11 o2 a - o3

11 t 2 5 5 " , " t 2 5 !:i 11 11 t 1 1 5 11 , . . t 1 1 5 " 260 2 7 0 P L A Y 1104 1 8 f a - o5 1 2 c 2 1 4 b -·o3 f a - 11 2 8 0 P L A Y 11 t 2 5 5 . . , .. t 2 5 5 11 2 50

PLA Y PLAY

290

P L.A Y

, 11 t 2 5 5 11 , . . t ll. 5 11 .. , 1104 e - a - f # 11 , 110

, .. t 2 55 11 11 t 1 20 11 , 11 t 1 2 0 11 , 11 t l. 2 1Z111

35


I

11111111111 :

GAMES FOR YO UR MSX

: 111111111111

1114 11, 1114 11, 1114 11 PL A Y 11e-o4b-g 11," ge"·"o3b- 11 ., 11e-12b PL A Y "f#o512d'' , 11o4do�518co418b-aa­ " ., "o114b-·o418a-gg-·f 11 330 PL A Y 1114e-o4b-g 11.,11l4gfe-", 11o214e­ o3gd·-11 300 310 320

PLA Y

-· "

340 P L A Y "fo512c 11,"e--· lBb-a-gf", 1102a-·o 312e-" 350 P L A Y "14c:o4ge","l4edo3b-","o214co 3ec" 360 PLA Y 11cb-o�ic 11, 1103go4d-e 11,"o2b-o3g e

n

370 PL A Y 11o412a ", 11o3ao4e-d 11, 11o212f 11 380 P L A Y "a-· .. " ,"a·-e-d" ,"oll2vl0b- ." 390 PL A Y "18ga-l4b-b--", 11l8e-dl4d-d- 11, "o214v8e-l8b-o3e-fg" 400 PL A Y "o�512c ." , 11Cgf 11, 11l2a- . 11 4l.0 PL A Y 11l8de-·l4ff 11, 11fgg 11, 1' 14gl8o3dg •

ab" 420 431Zt f • 11

PL A Y 11l2g •11, 11D5ed-c 11,"o414cfe 11 PL A Y "l4e-co4a- 1',"o4a-a-e-", 110312

440 PL A Y "fo5co4d", "ce-o3a-'', 1102l4b--o 3fo2f-" 450 PL A Y "v1111e-", ••v7o418e-fgb-o514c e- '1 , 11e-b-b ·-e·-·" 460 END

36


111111111111:

HANGMAN

:11111111111l

HANGMAN This program, written by Carol Vincent, is a version of the popular word game. All the words are stored in DATA statements at the end of the program. You may add some words of your own by entering them as more DATA, and changing the '22' in line 300 to the number of words you intend using. Full instructions are included in the program. This game uses string handling functions to good effect, and also demonstrates some ways of checking whether a user input is valid or not. You may like to use similar routines in your own programs. It is very important that the words in the DATA statements consist entirely of capital letters - enter the words exactly as they appear in this listing. Also, before playing the game, please ensure that the 'CAPS LOCK' key is pressed as this program will not accept any inputs containing lower -case letters. Please note that none of the words in this program contain the same letter twice. If you add words of your own, please ensure' that they only contain a particular letter once.

· ·t;· . . ....l \

..

37

··'--'• ....

.�

.


I

11111111111 :

: 111111111111

GAMES FOR YOUR MSX

10

REM

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

20

REM

*

30 40

REM REM

* *

F e b ru a r y V i n c en t

Han g man

*

�������

*

1 98 4

b�

*

Grah am

C a r t er

50

REM

Carol

60

REM

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

70 *

REM

* NB .

80 *

REM

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

90

I<EY O F F

1 00

W I DTH

1 10

CLS

Mak e

sure

1 20

LOCATE LOCATE

1 5 , 2 : P R I NT 1 5 , 3 : P R I NT

LOCATE

0 , 6 : P R I NT

1 40

h an g man .

1 50

P R I NT

1 60 rd

CAPS

L OC K

is

on

39

1 30 of

&

11 h ave

P R I NT

y ou 1 1

Al l

11 H a n g m a n 11 11 = = = = = = = 1 1 . . Th i s

to do

is

is

a

g ue s s

g ame

the

wo

c h os e n . .

1 70

P R I NT

1 80

P R I NT

are

11 b y

the

c om p u t er

1 90 L O C A T E 0 , 1 3 : P R I NT t o c on t i n u e . . . 200

L $ = I NK EY$ : I F

210

CLS

220

REM

* Le t t er s *

230 REM

*********

240 250

b e f or e

y ou

h u n g ! ..

L $ = . .. .

.. P r e s s T HEN

an y

k ey

200

X $ = " A B CD E F G H I .J.<LMNO P Q R S T U V W X Y Z . . R$= " "

260

V=9

270

REM

* Ch oos i n g

280

REM

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

w or d

290

Z = RND < - T I ME >

300

W = I NT < RND < 0 > * 2 2 ) + 1

310

FOR

320

READ

1=1 A$

330

NE X T

I

TO

W

38

at

r a n d om *


I

l l l l l llll l l :

: l l l l l l l l l l l1

HANGMAN

* C ou n t i n g

h yp h en s *

f or

340

REM

350

REM

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

360

FOR

U= l

370

R$=R$+ " - "

380

NE X T

390

REM

L E N < A$ )

U * I n s t r u c t i on s * ************** 7 , 2 : P R I NT 1 1 0K .,

400 R E M

LOCATE

410

m ay s t a

you

n ow � "

rt

9

430

ha

you

g uesses " P R I NT : PR I NT

T A B < 2 > ; " H ere

l e t - " ; T A B < 2 7 ) ; " He r e 440 PR I NT ; 1 1 Wor d s o 450

" R e m e m b er

4 ., 3 : P R I N T

L O CA T E

420 ve

TO

PR I NT

" t er s f ar " 1 1 yet

you

are

the

the "

is

h ave

n ot " ; T AB < 2 7 )

used ..

4 6 121 P R I N T 4 7 121 P R I N T

X $ ; T AB < 2 7 > ; h yp h e n s *

4 8 121 R E M

* Pr i n t i n g

4 9 121 R E M

* * * *.* * * * * * * * * * * * * *

::i 00

PR I N T

5 1 121

IF

R$ THEN

A$=R$

* En t er i n g

5 2 121 R E M

**************** 1 1En t er the

530

REM

::i40

P RIN T : PR I N T

550

I NP U T

IF

l e t t er

Y �t

* Ch e c k f o r N o . of l e t t ers * **************************

5 6 121 R E M 570 REM 580

1 54 121 g uess *

L EN < Y $ ) =1 T H E N

65 121

5 9 121 P R I N T 61210

P R I NT

1 1 0n e

610

P R I NT

..

62 0

FOR

630

CLS

Z= 1

64 121 G OTO 650

let t e r

on l y 1 1

***************" TO

Z

10 0 0 : NE X T

390

Q=ASC ( Y $ ) i n p ut

is

a

l et t er *

6 6 121 R E M

* Chec k

670 R E M

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

68 0

IF

Q (65

OR

Q)9 0

39

THEN

1 680

n

;


cffff1111111 :

GAMES FOR YOUR

�111111111111

MSX

ch a r .

i n p ut

in

w or d *

690

REM

*F i nd

700

REM

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

710 72 0

F = I N S T R < A$ , Y $ ) I F F=0 THEN 830

730

8= 1

74 0

P=F l i ne

in

c h ar .

of

-'s *

75 0

REM

* Put

760

REM

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

770

FOR

K= 1

780

R $ = L E F T $ ( R $ , P - 1 > + Y $+M I D$ ( R $ , P + 1 , <

TO

30

L E N < R$ ) ) ) 790 800

P= I NSTR < AS , Y $ ) S=P- 1 IF

820

NE X T

830

F $ = X :l: X $= 1 1 11

840

THEN

P=0

810

K=3 1

K

f rom

l et t er

a l p h ab e t *

850

REM

* Erase

860

REM

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

8 70

FOR

1=1

880

IF

TO

L E N�F $ )

I = I NSTR < FS , Y $ ) THEN X $= X $+M I D$ < F S , I , 1 >

ELSE

11

I

890 9 00

NE X T IF

F=0

910

IF

A$=R$

THEN

950

THEN

1 5 40

p l a y er

won?*

920

REM

* Has

930

R EM

***************** 390

940

GOTO

950

V=V- 1

960

PR I NT

t.ll

X S = X $+ 1 1

11

Y ou

h a ve

1 1 ;V;

p art

of

11

c h an c es

l ef

h a n g ma n *

970

REM

* Pr i nt

980

REM

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

990

R=9-V

O N R G O S U B 1 0 3 0 , 1 070 , 1 1 60 , 1 2 20 , 1 260 , 1 300 , 1 350 , 1 390 , 1 4 40 1 0 1 0 GOTO 390 1 0 00

1 020

END

1 030

REM

* F i rst

p art

40

of

h an g *


I

1 1 1 1 1 1 1 1 1 1 1: 1 04 0

REM

1 05 0

LOCATE

1 06 0

R ETURN

: 11 1 11 1 1 1 1 111

HANGMAN

******************** 1 0 , 1 9 : P R I NT p art

" " ----------·

1 070

REM

* Se c o n d

1 08 0

REM

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

1 09 0

LOCATE

2 0 , 1 9 : PR I NT

1 1 00

LOCATE

2 0 , 1 8 : P R I NT

1 1 10

LOCATE

2 0 , 1 7 : PR I NT

1 1 20

L O C A TE

2 0 , 1 6 : P R I NT

1 1 30

LOCATE

2 0 , 1 5 : P R I NT

1 1 40

LOCATE

2 0 , 1 4 : PR I N T

1 1 50

RETURN

11

11

11

11

..

11

11

..

11

11

11

11

1 1 60

REM

* T h i rd

REM

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

1 1 80

LOCATE R ETURN

of

h an g m a n *

1 1 70 1 1 90

p ar t

of

1 3 , 1 3 : PR I NT

1 200

REM

* Part

1 210

REM

***********

1 220

LOCATE

1 230

RETURN

1 240 1 250

REM REM

1 26 0

LOCATE

1 27 0

R ETURN

1 3 , 1 4 : PR I N T

1 3 , 1 5 : PR I NT

1 28 0

REM

* Part

1 290

REM

**********

1 300

LOCATE

1 2 , 1 5 : PR I NT

LOCATE

1 4 , 1 5 : PR I NT

1 320

RETURN

1 33 0

REM

* Pa r t

1 340

REM

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

1 350

LOCATE

1 3 , 1 6 : PR I NT

1 360

RETURN REM

* Part

1 380

REM

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

1 390

LOCATE

1 2 , 1 7 : P R I NT 1 4 , 1 7 : PR I NT

LOCATE

1 4 20

REM

* Last

I 11 I

11

0 11

"\"

" I"

seven *

1 370

R E T UR N

11

six *

1310

1 400

�� -------��

f ou r *

* P a r t f iv e * ***********

1410

h a n g ma n *

11 I 11 I

eig h t *

p ar t *

41

"I " "\"


I

11111111111:

GAMES FOR YOUR

1 430

REM

1 44 0

CLS

1 450

FOR

1 460

CLS

1 470

LOCATE

: 1 11 1 1 1 1 1 1 11 1

MSX

*********** J= 1

TO

4

8 , 9 : P R I NT

" **************

**********" 1 4 80 e

LOCATE

b e en

1 490

B , 1 0 : P R I NT

" So r r � �ou

hav

8 , 1 1 : F'R I NT

" *************

h un g "

LOCATE

***********" 1 50 0

NE X T

.]

1510

P R I NT : PR I NT

1 52 0

FOR

Z=1

1 530

GOTO

1 �i 4 0

CLS

1 55 0

LOCATE

TO

" The

word

1 00 0 : NE X T

was

" ; A$

Z

1 590 6 , 3 : P R I NT

" **************

6 , 4 : P R I NT

"W

6 , 5 : P R I NT

"**************

*****" 1 5 60 0

N

LOCATE

E

L

L

D

E"

1 570

LOCATE

*****" 1 580 FOR

Z= 1

1 590

CLS

1 600

LOCATE

a n ot h er

TO

1 00 0 : NE X T

6 , 9 : PR I NT

Z

" Wo u l d

�ou

l ike

g o? "

1610

I NP U T

1 62 0

IF

T$

1 63 0

CLS

1 640

LOCATE

T$= " Y "

OR

T$= " Y ES "

1 4 , 2 0 : PR I NT

T HE N 2 0

" OK ,

Thank

�o

u" 1 650

FOR

1 66 0

CLS

1 670 1 680

GOTO CLS

1 690

LOCATE

l e t t er s 1 700

Z=1

TO

100 0 : NE X T

1 020 6 , 1 1 : F'R I NT

LOCATE FOR

" P l ea s e

e n t er

on l � " 6 , 1 2 : F'R I NT

************" 1710

Z

F'= 1

TO

2000

42

" *************


l l l llll l l l l :

I

: l l l l l l l l l l l1

HANGMAN

1720 NEXT P 1 730

CLS

1 740

GOTO

1 750

DATA T A B L E .. 1 760 DATA

410 1 1 F'R I V AT E 1 1 , 1 1 B R E A K 1 1 , 1 1 H O U S E 1 1 , 1 1

1 1 T Y F'E 1 1 ' 11 M O U T H 1 1 ., " D I AR Y 1 1 ' 1 1 C O M F' U T E R 1 1 , . . P E R S O N " ., " R U GB Y " , " T O D A Y . . 1 7 7 0 D A T A 1 1 F'E NC I L 1 1 ., 1 1 R A D I O " ' " GA R D E N " ' 1 1 .JU M P E R .. 1 780

DATA

" H I S T OR Y " , " T E R M I NA L " , " SU G A R

" , " NU M B E R .. , " CA N O E " 1 7 9 0 D A T A " S O C K " ., " MO N E Y 1 1 ., 1 1 MS X 1 1

..

•..

.. �\1 .

,,\J,,. -

...(1,.,,

.,Jt.... ... . -4,, ........ . .

... lth•

,� ........... . .

· · ·. . . .

43

.. ,

. ,,,

.

.

.ltuutlt •


I

11111111111 :

GAMES F OR YOUR

: l l l l l l l l l l ll

MSX

BREAKBALL This 'Bouncing Ball' game contains all the instructions in the program. Please note that the cursor keys on the right side of the computer must not be held down, but should be pressed repeatedly to move the bat.

• 1 0 REM 2 0 R EM

***************************** * Break b a l l *

30

REM

*G .

40

REM

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

50

GOSUB

60

REM

70

LOCATE

80

REM

90 I F 1 1 : E= 3 1 00

P .

C a r t er ,

1 9 84 *

320

* Pr i n t

bal l *

A ., B : P R I NT

* Ch eck E<3

IF

Nov e m b er

ll • ll

p o s i t i on

T HE N L O C A T E

E >34

of

b at *

E ., 1 9 : P R I NT

T HE N L O C A T E

11

E ., 1 9 : PR I NT

11

" : E=34 1 10

REM

1 20

A l =A : B 1 =B

* Mo v e

bal l *

1 30

A 1 =A 1 + C : B 1 = B 1 + D

1 40

REM

1 50

IF

A 1 <2

1 60

IF

81 <2

AND

-[I

I

1 70

E+ l =A IF

E + 2 < >A 1 80

* Bo u n ce OR OR OR

81>18

ba l l

if

n ece s s a r y *

T HE N C = - C : B E E P

A 1 >34

8 1 ) 1 8 AND E=A 81 > 1 8

AND

AND

E < >A

T H EN 2 7 0

F $ = I NK E Y $

44

E+2=A

AND

OR

81 >18

T H EN

E+ 1 < >A

D=

AND


I

11111111111 : F$= 11 11

1 90

IF

200

F=ASC ( F$ )

210 NT

11

IF

NT

11

T H EN 2 4 0

F = 2 8 T HEN E 1 =E : L O C A T E E , 1 9 : PR I 1 1 : E =E 1 + 2 : L O C A T E E , 1 9 : PR I NT ��­

-�� : GO T O 220

: 111111111111

BREAKBALL

IF

70 F = 2 9 T HE N E 1 = E : LO C A T E E , 1 9 : PR I 11 : E= E 1 -2 : LO C A T E E , 1 9 : PR I NT ��­

-�� : GO T O

70

230

REM

* Er a s e

240

LOCATE

2 �.:10

A =A 1 : B= B 1 GOTO

270

FOR

280

LOCATE

290

G OS U B

X=1

GOTO

310

STOP

11

11

70

2 60

300

bal l *

A , B : P R I NT

70

320

REM

* I n i t i a l i sa t i on *

330

REM

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

340

I<E Y

O F F : CL S : CO L OR

350

REM

* I ns t r u c t i ons *

REM

P R I NT

390

..t r..trJrJI" JI"JI"JI"Jr rJ

..

P R I NT : P R I NT : PR I NT

400

P R I NT

roy

al l "

410

P R I NT

he

4 , 14 , 14

************** T A B < 1 4 ) ; 1 1 B r e a k b a l l 11 11 PR I NT 1 AB ( 1 4 ) ; 11

3 60 370 380

X

1 00 0 : NE X T 11 11

TO

A , B : P R I NT 750

" In

th i s

11 t h e

g ame

br i ck s

must

y ou

at

the

t op

dest of

t

s c r e en "

420

P R I NT

"by

b ou nc i ng

a

bal l

a g a i ns t

t h em . " 4 30

P R I NT

440

P R I NT

e

l ef t

450

P R I NT

hol d 4 60 4 70

the

b at ,

use

th

" r i ght

c u r s or

k eys .

Do not

the"

PR I NT

t h em

" T o c ont ro l

and "

" k ey s

d ow n

-

y ou

must

p re s s

rep - "

P R I NT

" eat ed l y

t o mak e

45

t he

b at

mo


I

11111111111 :

:111111111111

MSX GAMES FOR YOUR

ve . " 480 ge

P R I N T : F'R I NT of

490 111

the

" Do n ' t

P R I NT

" or

y ou r

5 0 0 P R I NT : PR I NT t i n ue . " 510

bat

IF

COLOR

540

REM

* Pr i n t

bor d e r

550

FOR

A=0

36

5 60

LOCATE

A , 0 : PR I NT

�i7 0

LOCATE

A , 2 0 : PR I NT

!::i80

NE X T

F $= " "

an y

d i s a p p ea r k ey

to

c on

FOR

LOCATE

A=0

61 0

LOCATE

62 0

NE X T

510

TO

aroun d

sc reen *

"-" "-"

630

REM

LOCATE

65 0

F' R I N T

660

LOCATE

67 0

F'R I N T

68 0

LOCATE

TO

* Pr i n t

I I I I I I I I I"

111"

" br i c k s " *

1 , 1

" IIIIIIIIIIIIIIIIIIIIIIIIII 1 ,2 11

I I I I I I I I 1., PR I NT

20

0 , A : P R I NT 3 6 , A : F' R I NT "I"

A

64 0

I I

THEN

A

590

t I

ed

1 1 , 1 , 1 : CLS

600

I

the

F $ = I NI<E Y $

530

I

over

wi l l

" Press

520

690

go

sc reen "

IIIIIIIIIIIIIIIIIIIIIIIIII

1 ,3 11

I I I I I I I I I I I I I I I I I I I I I I I I I I

I I I If

700

REM

* I n i t i a l i se

710

REM

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

720

C = l : D= l : E = 1 5

730

LOCATE

v ar i ab l e s *

..

..

740

E , 1 9 : F'R I N T A = R N D < - T I ME >

750

REM

* St a r t

7 60

REM

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

770

A = R N D < 1 > : A= I N T < A * 1 0 ) + 5

p o s i t i on

-

f or

780

B = R N D < l > : B = I NT < B * 5 ) + 5

790

R E T UR N

46

ba l l *


I

11111111111 :

DAR TS SCORER

: 11111111111 1

DARTS SCORER This program by Andrew Ogilvie is for darts players. It will take your mind off the scores and help you concen足 trate on your game. All you have to do is type in the number you are starting from, and enter your score after each go. The computer will perform the necessary calculations and tell you which player has won the game.

47


I

1 1111111111 : 10

REM

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

20

REM REM REM

*

30 40

: 11 111111111 1

X GAMES FOR YOUR MS

Dart s

Sc orer

*

����� ����� ��

* * A n d rew

* Og i l v i e *

50

REM

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

60

KE Y

OFF

70

COLOR

80

CLS

90

I NP U T 1 1 E n t er p l a y er 1 ' s n a m e 1 1 ; N 1 $ I NP U T 1 1 E n t er p l a y er 2 ' s n a m e 1 1 ; N 2 $

1 00 1 10

5 ., 1 ., 1

PR I NT

1 2 0 I NP U T 1 1 En t er m 1 1 !I· T

the

1 30

PR I NT

1 40

PR I NT 11 T h a n k - you 11

1 50

FOR

1 60

CLS

1 70

LOCATE

ween

1=1

TO 6 ., 0

s c ore

5 0 0 : NE X T

to

p lay

f ro

mat c h

be t

I

: F'R I NT 1 1 D a r t s

"

1 80

L O C A T E 1 4 ., 1

1 90

P R I NT

: PR I NT

N 1 $ ; 11

200

LOCATE

1 0 ., 4 : PR I NT

N1$

210

LOCATE

20 ., 4 : PR I N T

N2$

220

LOCATE

230

LOCATE

1 0 , 6 : P R I NT 20 , 6 : F' R I N T

T

240

T 2 = T : G= 1

250

REM

* En t er

2 60

REM

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

270

IF

G= l

THEN

300

280

IF

G=2

THEN

410

290

GOTO

and

1 1 ; N2 $

T

Sc ores *

250

300

REM

* P l a y er

310

REM

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

l 's

320

LOCATE

0 ., 2 0 : PR I NT

0 ., 2 0 : PR I NT " E n t er 1 330

P 1 =P 1 + 1

340

IF

go*

P1=10

THEN

s c o r-- e

S P C < 30 ) : L O C A T E ( 1 )

" ; : I NPUT

S= 1 0 : P 1 = - 1 : GOSUB

0

48

G

53


I

11111111111 : 350

T=T-8 1

3 60

IF

: 11111111111 1

DARTS SCORER

T <0

OR

T= l

THEN

T = T +8 1 : 80 T O

39

0 370

LOCATE

380

IF

1 0 , P 1 +7 : PR I NT THEN 590

T=0

390

8=2

400

80TO

410

REM

2 �i 0 * P l a yer

4 2 0 REM

T

2's

go*

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

4 3 0 L O C A T E 0 , 2 0 : PR I NT S P C < 30 ) : L O C A T E 0 , 2 0 : PR I N T " En t er s c o r e ( 2 ) " ; 440

I NP U T

450

P 2 = P2 + 1

G2

4 60

IF

P2= 1 0

THEN

S=20 : P2=- 1 : 80SUB

53

0 470

T 2 = T 2 -8 2

480

IF

0

T2<0

OR

T2= 1

THEN

T 2 = T 2 + 8 2 : 80 T

510

490

LOCATE

500 · I F

20 , P2+7 : PR I NT T 2 = 0 T H E N 660

510

8= 1

520

GOTO

T2

250

530

REM

* C l ear

540

REM

********************** I=1

550

F OR

5 60

LOCATE

570

NE X T

580

RETURN

590 600

REM REM

TO

p art

of

sc reen *

12

S , I +6 : PR I NT

SPC < 6 >

I * P l a y er 1 h a s won * ******************

610

CLS

620

PR I NT

630 LOCATE 0 , 5 : PR I NT N 1 $ = " •• ; N2 $ ; " by " ; T 2 ; " p o i n t s " 64 0

PR I NT

650

GOTO

660

REM

* P l a y er

670

REM

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

680

CLS

710 2

has

49

won *

h as

be a t e n


I

1111 1 111111 :

MSX GAMES FOR YOUR

690 L O C A T E 0 , 5 : P R I NT N 2 $ ; 1 1 11 ; 1\1 1 $ ; 1 1 b y 1 1 ; T ; 1 1 p o i n t s . . . 700

GOTO

710

REM

* An ot h e r

720

REM

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

IF

GOTO

7 60

KE Y

770

END

be a t en

g ame *

5 , 8 : P R I N T " An o t h er

D$ D$= " N 11

750

has

710

7 30 L O C A T E n ) 11 ; : I N F' U T 740

:11111 111 1 1 1 1

THEN

7 60

20 ON

50

g ame

( y/


I

11111111111 :

MINEFIELD

:lllllllllll l

MINEFIELD You must try to escape from the minefield in this game, written with the help of Simon Gould. Use the cursor keys to move carefully around the screen, but take note of the warmng s1gns. At the beginning of the game you must enter the number of mines that will be planted in the minefield. Any number less than 35 can be used. If you tread on a mine you will be blown up, and the locations of the other mines will be displayed. This game features a timer and an on-screen score.

-----

51

--


I

I i 111111111 :

: 11111111111 1

MSX GAMES F OR YOUR

10

REM

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

20

REM

*

30 40

REM REM

* S i mon *

50

REM

60 R E M 7 0 REM 80 K E Y

*

M i n ef i e l d Grah am i 984

Gou l d �

Cart er* *

**************************** * I n s t r u c t i on s * ************** OFF

CLS

90 1 00

A $ = I NI<E Y $

1 10

LOCATE

1 4 , 0 : P R I NT

1 20

LOCATE

1 4 ., 1 : PR I N T

1 30

LOCATE

0 ., 4 : P R I N T " Y o u a m i ne- "

must

tr�

a

t i me

l imit

PR I NT

1 50

PR I N T

1 60

PR I N T

1 70

P R I NT

to

w i th in

n ot e

1 90

PR I NT PR I NT

210

PR I NT

220

he 230 240

" Use

c ursor

the

c on t ro l

k e�

" aroun d

the

bu t

t ak

sc reen ,

of "

200 wi 1 1

" un i t s . "

move " P R I NT

1 80 e

"f ield

1 00 "

of

s

to

f r om

esc ape 1 40

" M i n ef i e l d "

" r.- •·u. u.-r.- .-u.. ,... ,... . .

" t he 11 l f

warn i n g � ou

t read

s i gn . " on

a

m i ne

P R I NT

" od e

t il e

and

l o c a t i on s

t

P R I N T 11 m i n e s w i l l be r e v e a l e d . " P R I N T : PR I N T " P r e s s a n � k e y t o c o n A $ = I NK E Y $ A$= " "

THEN

2 �i 0

260

IF

270

REM

* I n i t i a l i se

280

REM

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

290

SC=0

300

A $= " o 11

310

of

ot her "

t i n ue . " 250

it

e}·� p 1 - "

CLS

52

Var i ab l es *


1 11 1 1 1 1 11 11 1 : · 320

PR I NT

" Nu m b er

330

I NP U T

MNS

340

IF

350

FOR

:11111111111 1

MINEFIE LD

M NS < 2 P=0

OR TO

of

m i nes

MNS >35

< 2- 35 ) "

THEN

310

500

360

NE X T

370

DIM

M < MN S , 2 >

F'

380

FOR

N= l

390

RD=RND < 1 > : M < N , 1 > = I NT < RD * 20 ) + 1

TO

MNS

400

R D = R N D < 1 > : M < N , 2 > = I NT < R D * 3 2 )

410

NE X T

420

REM

* Pr i n t

430

REM

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

440

CLS

450

L O C AT E

N D i sp l a y *

0 ., 2 1 : P R I N T

.. T i mer=

S c o r e = " ; SC 460 470

T=0 : X = 1 9 Y =R N D < l > : Y = I NT < Y * 28 )

480

LOCATE

490

T=T+ 1

500

LOCATE

510

IF

Y - 1 , X - 2 : PR I NT 6 ., 2 1 : PR I N T

T = 1 00

520

GOSUB

530

A = X : B= Y

THEN

A$

T

780

670

540

REM

* Ac c e p t

550

REM

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

!:i6 0 �i 7 0

B $ = I NKE Y $ I F B$= " .. THEN

�i8 0

I P=ASC < B$ )

590

IF

I P=3 1

AND

X <23

600

IF

I P=30

AND

X >3

610

IF

I P= 2 8

AND

Y < 30

620

IF

I P= 2 9

AND

Y >0

6 30

REM

640

REM

* Er a se

i nput

f rom

k e y b oard *

4 80

l ast

THEN THEN THEN THEN

X=X+ 1 X=X- 1 Y=Y+ 1 Y=Y - 1

p os i t i on *

6!:i0

********************* L O C A T E B - 1 ., A - 2 : PR I N T 1 1

6 60

GOTO

670

L O C A "f E

680

IF

11

480

X =3

11

1 1 , 0 : PR I NT AND Y > 1 1 AND

53

EX I T 1 1 Y < 20

THEN

8 70


I

11111111111 : 690

N= l

700

IF

X >= 2 0 11

l : PR I N T

..

T HE N

7 10

Y C= M < N , l ) - Y

720

XC=M < N , 2 > - X I F ABS < X C > < 3

730

L OCA T E

X = X - l : L O CA T E

AND

1 1 , 0 : PR I N T

74 0

IF

7 �i0

N=N+ l

X C= 0

760

IF

770

GOTO

780

L OCA T E

:1111 1111111 1

MSX GAMES FOR YOUR

AND

N = M NS

ABS

Y-l , X+

.< YC > < 3

THEN

" W A RN I N G "

Y C= 0

T HE N

T HE N

780

R E T UR N

7 10 1 1 : L OCA T E Y - 1 , X - 2 : PR I NT . . " " : L OCA T E Y + 1 , X : PR I N T

Y , X -2 : PR I N T 11

11

790

REM

* D i s p l ay p o s i t i o n s

800

REM

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

810

FOR

N= 1

820

LOCA T E

830

NE X T

840

FOR

850

NE X T

860

RUN

TO

of

m i nes*

MNS

M < N , 1 ) , M < N , 2 ) : PR I N T

11 * " ;

N P= l

TO

1 0 00

P

870

SC= SC+ 100

880

L OCA T E

�i , 10 : PR I N T

" M i s s i on

�i , 12 : PR I N T

" St an d

Suc c es

sf u l " 890 he

LOCA T E n e �·� t

900

FOR

9 10

GOTO

f i e 1 d •• P= l

TO

10 00 : N E X T

440

54

P

b y f or

t


I

11111111111 :

:lllllllllll l

CAL ENDAR

CALENDAR Do you know the actual day of the week when you were born? If not, this program will tell you. It prints a calendar for any month in any year, and will tell you when your birthday, or any other anniversary, will fall in the years to come. REM REM REM

10 20 30

************** * Ca l e n d a r * * ����������� � *

40 REM

*D .

P i l l i n g er *

50

REM

*D .

O l esh

60

REM

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

70

CLS

80

PR I NT

90

PR I NT

1 00

*

" C a 1 en d ar "

OR

M< 1

M>12

1 10

IF

1 20

PR I NT

•• E n t er

1 30

I NP U T

Y

1 40

PR I N T

l �i 0

PR I NT

1 6 121

PR I NT

1 70

G O S LJB

1 80

D=DD

1 90

M=M+ l IF

210

GOSUB

, • • - - - - -· - - - . .

1 00

THEN

� ear "

1 1 M on t h " ; M ; 1 1 •

Y ear " ; Y

360

M>12

200

,

mon t h "

, , " En t er I NP U T M

THEN

M= l : Y = Y + l

350

DD < D

220

IF

230

N=29 : I F

THEN

DD=DD+7 OR

M=5

M=7

OR

M = l lll

240

N=N+ l ELSE I F M < >3 THEN PR I NT 11 Sun Mon Tue Wed T h u

2 �i 0

P=4 * D

2

THEN

t 11

X=l

260

FOR

270

PR I NT

TO

N

T AB < P > ; X ;

55

OR

M= 1

N=N+2 F r· i

Sa


I

l ll l l l l l l ll :

X GAMES FOR YOUR MS

280

P= < P +4 )

290

IF

300

NE X T

310

P R I NT

320

I NP U T

AND

POS < 3 > >26

:11111111111 1

P<21 T HE N

PR I NT

X , , ,

11 Press

ENTER

to

go

on

..

A 70

330

GOTO

340

MM=M-2 : Y Y = Y M M >0

350

IF

360

MM=MM+ 1 2

T HE N

370

Y Y=YY-1

380

C = I N T < Y / 1 00 )

400

390

Y Y = Y Y - 1 00 * C

400

D D = 1 + I NT < 2 . 6 * MM - . 1 9 ) + Y Y + I N T < Y Y / 4 )

+ I NT ( C / 4 ) - 2 * C 410

D D = D D - 7 * I N T < DD / 7 )

420

RETURN

56


I

21

11111111111 :

:11111111111 1

21 This is an MSX version of the classic card game. You and the computer take turns in trying to get a score as close to 2 1 as possible without exceeding that figure. This version of the game will recognise a five-card trick. The computer is a difficult, but not unbeatable, opponent who weighs up the situation carefully before making a decision. This game is very friendly to play, with all the instructions contained in the program.

10 20 30 40 50

REM REM REM REM REM

******** * 21 * * � * ******** * S c ot t V i n c e n t

60

REM

***************************** OFF

70

KE Y

80

CLS

90

COLOR

Graham

C a r t er *

9 , 15 , 15 * St art

g am e *

1 00

REM

1 10 1 20

REM * * * * * * * * * * * * P $ = ' ' *..._••_...•._........_.......

1 30

PR I NT

1 40

B=0

1 �i 0

C=0

1 60

PR I NT

" P l e a se

1 70

I NP U T

N$

1 80

COLOR

7 , 1 , 1

1 90

CLS

....... . .

F' $

en t er

y ou r

n ame "

N$

200

P R I N T : P R I N T : P R I NT

210

REM

* De c i d e

220

REM

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

230

P R I N T : PR I N T

to

see

who

g oe s

g oes

who I

''

wi l l

f i rs t . "

57

f i rst * t os s

a

coin


I

11111111111 : 240

PR I NT

11

Do

y ou

want

h eads

or

tai l

( H / T ) 11

s? 2 �i 0

: 111111111111

GAMES FOR YOUR MSX

A$= I NKE Y $

2 6 0 I F N O T ( A$ = " h " O R 1 1 O R A $ = ' ' T 11 ) T H E N 2 5 0

A$= " t 11

270

PR I NT

280

D = R N D < - T I ME >

290

X =R N D < l > : X = I N T < X * 2 >

300

IF

OR

A$= 11 H

ELSE

B$= 11 T

T A B < 1 0 ) ; A$

X =0

THEN

B$= 11 Head s 11

a i l s 11 310

P R I NT

320

A= l

330

IF

X =0

AND

B$ ; 1 1 .,

X=l

AND

( A$= 11 h "

( A$ = 1 1 t 1 1

340

IF

I NT

" Y ou

A=0

350

FOR

360

X=0

" ;

THEN

OR

P R I NT

" I

P= l

1 1 ; N $ ; 11 • 1 1 T O 1 00 0 : NE X T

g ames*

win

370

Y =0

380

REM

*10

390

REM

**********

400

FOR

F= 1

410

P R I N T : F' R I N T

me

OR

TO

A$= " H 11 )

A $ = 1 1 T 11 )

THEN

w i n 11

OR

A=0

ELSE

PR

f or

ga

P

10 " Press

an y

k ey

" ;F

420

l $ = I NK E Y $

430

IF

l $= '' 11

440

IF

A=0

THEN

450

IF

A= l

OR

460

IF

A= 1

AND

4 70

IF

Y =0

THEN

THEN

420

GOSUB

A=0

AND

1 0 70 X >0

THEN

GOSUB

650 Y < >0

THEN

480

IF

X =0

THEN

Y=l

490

IF

X >Y

THEN

B=B+ 1

X<Y

T HE N

C=C+ 1

500

IF

510

P R I NT : F' R I N T

520

PR I NT

530

A = A + < A= 1 > - < A =0 )

54 0

NE X T

550

FOR

GOSUB

" Comp uter :

1 1 ; N$ ; 1 1 : "

TAB ( 5 ) ; B ; TAB ( 1 1 ) ; C F

P= 1

TO

1 070

X= 1

500 : N E X T

58

P


I

: 11111111111 1

21

11111111111 :

g am e *

of

560

REM

* En d

570

REM

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

580

P R I NT : P R I N T

5 90

IF

b eat

1 1

.. A n o t h e r

g ame?

P R I N T : PR I N T

61 0

I NP U T

620

OR A $ = 1 1 Y 1 1 T H E N P R I NT : P R I N T 1 1 B y e t h e n . . .

630

wi

< YIN

A$

A $ = 1 1 y 11

640

S T OP

650

P R I NT : PR I NT

RUN

h ave t ur n

" Y our c ard s an y k e y to

Press

d ea l t .

wi l l " I

PR I NT

ELSE

600 ) 11

IF

y ou

" Ma y b e

t i me . "

neN t

y ou

t h at . "

e n j o y ed

t i me . "

n e >� t

me

beat

" I

PR I NT

THEN

B >C

b ee n t h em

o v e r . .. 660

l $= I NK E Y $ THEN

I $= " 11

670

IF

680

GOSUB

660

1 54 121

P= 1

TO

690

FOR

700

IF

7 1 121

P R I NT : PR I N T

7 2 121

Y =Q

GOSUB 11

7 3 121

L= 1

7 4 121

F OR

7 5 121

IF

Q= l

THEN

GOSUB

L=3

THEN

CLS

P= 1

TO

P : CLS

1 00 : NE X T

THEN

Q= 1

II

1 59 0 ; Q : PR I NT

P : GOSUB

1 00 : NE X T

760

IF

770

P R I NT : PR I NT : P R I N T

780

LET

790

L=L+ l

800

PR I NT

1 54 0

1 5 9 121 11

" ;Q

Y = Y +Q c ard s .

T A B ( 1 0 ) ; L ; 11

Tot a l = ..

;Y trick ,

c ard

b ust

or

ok ? *

8 1 121

REM

*5

820

REM

*************************** AND

Y <=2 1

830

IF

L=5

840

IF

Y >2 1

THEN

980

850

IF

Y =2 1

T HE N

1 121 2 121

860

PR I NT

T A B < 1 0 ) ; .. T w i s t

T/S) " 8 7 121

THEN

A $ = I NK E Y $

59

940

or

S t i c k '?


I

11111111111 : 880 "

IF

OR

NOT

< A$= " t "

A $ = 1 1 8 11 )

890

PR I NT

900

FOR

910

IF

920

CLS

930

R E T UR N

: 111111111111

UR MSX GAMES F OR YO

THEN

OR

A$= " T "

OR

A$= 11 s

870

T A B < 1 0 ) ; A$

P= 1

TO

A $ = .. t "

P= 1

1 00 : N E X T OR

TO

A$= 11 T 11

940

F OR

9 �i 0

PR I NT

.. Y ou

h ave

1 00 : NE X T a

Th i s

c an

on l y

be

P THEN

740

P : CLS

f i v e - c ard b e a t en

tr i ck

by

Pon t

oon . .. 960

Y =22

970

RETURN

980

FOR

990

PR I NT

P = 1 T O 1 000 : NE X T P : C L S . . S o r r y - y ou h a v e b u s t .

I

w i n . .. 1 00 0

Y =0

1010

RET URN

1 020

CLS

1 030

PR I NT

ed

" We l l

d on e

THEN

Y =23

1 040 1 05 0

Y =2 1 I F L=2

1 06 0

R E T UR N

1 070

P R I N T : PR I NT

al

me

t wo

y ou

h ave

" Press

an y

key

s c or

1 080

I $ = I NK E Y $ : I F GOSUB

1 1 00

CLS

1 1 10

IF

1 1 20

PR I NT

1 1 30

X=Q M= 1

1 1 50

GOSUB

1 1 60

IF

1 00 : N E X T IF

1 1 80

PR I NT

M=3

1 1 90

X = X +Q

! $= " "

THEN

GOSUB

TAB < 1 0 ) 11

T HE N

1 08 0

1 6 70 " ;Q

1 �i4 0

Q= 1

1 1 70

de

1 540

Q= 1

1 1 40

to

c ar d s . . .

1 09 0

0

-

2 1 . 11

T HE N

GOSUB

THEN

CLS

1 6 70 : FOR

P TAB < 1 0 ) ; ..

60

.. ; Q

P= 1

T


I

11111111111 :

: 111111111111

21

1 200

M=M+ 1

1210

P R I NT

T A B ( 1 0 > ; M ; 11 .. Press

u

c ard s .

Tota l =

;X

1 220

P R I NT

1 230

I $= I NK E Y $ : I F

1 240

REM

*5

1 250

REM

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

c ard AND

an y

k e y . 11

I $ = 11 "

THEN

1 230

tr i ck ,

b ust

or

1 260

IF

M=5

1 27 0

IF

X >2 1

THEN

X <=2 1 1 420

X =2 1

THEN

1 460

1 280

IF

1 29 0

D = R N D < - T I ME >

1 300

IF

EN

THEN

ok ? *

1 35 0

X > 1 4 + I N T < RN D < 0 > * 3 >

AND

A=0

TH

AND

R N D < IZI >

1510 D = R N D < - T I ME >

1310 1 32 0 > .3

IF

X > 1 4 + I N T < RN D < 0 > * 3 >

THEN

1510

1 330

FOR

T

t h i nk

11 !

P= 1

1 340

GOTO

1 3�5 0

CLS

1 36 0 11

PR I NT

1 370

IF

p on t oo n

TO

I

1 00 : NE X T

P : P R I NT : PR I N

t w i st . 1 1

wi l l

1 1 50

A=0 to

11 I

h ave

THEN beat

a

f i v e - c ar d

PR I NT

" Y ou

t r i ck .

must

g et

me . "

1 380 I F A= l AND Y =2 2 THEN P R I NT " Y o u s t i l l b e a t m e t h ou g h , a s y ou g ot P o n t oon . " 1 390 I F A= 1 b ea t s y ou . 1 400

X =2 2

1410

R ETURN

1 4 20

CLS

1 430

PR I NT

1 44 0

X =0

1 450

RE TURN

1 46 0

CLS

1 470

P R I NT

1 48 0

X =2 1

1 490

IF

M=2

AND Y < 22 I w i n . ..

THEN

P R I NT

11 !

h ave

b ust .

Y ou

" I

h a ve

sc ored

21 "

THEN

X =2 3

61

" Th at

w i n . ..


I

11111111111 : 1 !:i 0 0

R E T UR N

1 �i 1 0

CLS

1 520

PR I NT

1 530

RETURN

1 54 0

D = R N D < - T I ME >

1 55 0

Q= I NT < RN D < 0 > * 1 3 ) + 1 IF

1 570

FOR

1 580

R E T UR N IF

P R I NT : P R I N T be

A $ = I NK E Y $

1 620

IF

OR

l ow ?

THEN

P R I NT : P R I N T A $ I F A $ = 1 1 h , . OR A $ = " H ..

1 650

F OR

1 66 0

RET URN

P= l

THEN P

1 00 0 : NE X T

TO

X <= 1 0

OR

THEN

IF

X >= 7

1 68 0

I F

X <7

1 690 1 70 0

P R I N T " I h a v e an a c e . . . I F Q= 1 THEN P R I NT " I w i l l

t l ow . " gh . " 1710 1 720 l ow 1 730

ELSE

THEN

X >10

PR I NT

A$= "

11 1

G�= 1 1

Q= 1 1

1 670

OR

OR

1610

1 640

1 630

wan

y ou 1

< H/L ) 1

O R A$= " H "

< A$ = " h "

NOT

A $= " L " )

Do

ac e .

" An or

h i gh

1610

1"

1 7 20

THEN

Y >10

P

1 00 0 : NE X T

1 600

to

Q= 1 0

THEN TO

P= 1

1 590 it

st i c k . "

wi l l

" I

Q)10

1 560

t

: 11111111111 1

X GAMES FOR YOUR MS

Q= l

wi l l

mak e

i

it

hi

bet t er

be

mak e

R E T UR N P R I NT or

y ou

" An

ace .

wi l l

It

b ust . "

R E T UR N

62

h ad


I

1 1 1 1 1 1 1 1 1 11 :

NIM

:1 1 1 1 1 1 1 1 1 1 1 1

NIM This is the classic game in which you try to force the computer to take the last of a number of barrels. The number of barrels you start off with is printed at the top of the screen. The number of barrels will change from one game to the next.

63


I

11111111111 :

: 111111111111

MSX GAMES FOR YOUR

10

REM

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

20

REM

*

30 40

REM REM

* *D .

Nim

* *

P i l l i n g er , *

50

REM

*

D .

O l esh

60

REM

*

G .

C a r t er

&

* *

70

REM

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

80

REM

* I n i t i a l i se

90

REM

V a r i ab l e s *

1 00

********************** B = R N D < - T I ME >

1 10

CLS

1 20 1 30

X = I NT < RN D < 1 > * 2 5 ) + 5

B $ = 11 n n n n n n n n n n n n n n n n n n n n n n n n n n n n n

nnnnnnnnn" 1 40

REM

1 50

REM

********

1 60

KE Y

OFF

* T i t l es *

1 70

LOCATE

1 80

FOR

1 90

NE X T

200

REM

* St art

210

REM

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

220 11

LOCATE

TO

20 : FOR

W : P R I NT : NE X T

230

IF

240

LOCATE

TO

10

T

L E F T $ ( B $ ., X ) ; 1 1

3 ., 3 : PR I NT T HE N

1 ., 1 0 : PR I N T 11

l ef t

LOCATE

1 1 N i m . . ., ., " - - - 1 1 W= 1

g am e *

R ND < 1 > < . 5

b arre l s 250

0 ., 2 1 : P R I NT

T= 1

320 1 1 T h e re 1 1 How

1 ., 5 : I NP U T

are 11 ; X ; 11

man y

do

y ou

t ak e 11 ; TK 260

IF

TK< l

280

IF

X=l

290

LOCATE

270

X = X -T K

OR

TK >3

THEN

THEN

250

440 are 1 1 ; X ; 1 1

b arre l s

1 ., 1 0 : PR I N T .. l ef t

300

REM

* D ec i d e

310

REM

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

320

TK=3

330

IF

X =2

OR

h ow

X =5

OR

TK= l

64

" T h ere

man y

X=6

to

OR

t ak e *

X=9

THEN


I

lllllllllll :

: lllllllllll 1

NIM

34 0

IF

X =3

OR

350

IF

X =4

THEN

X=7

THEN

TK=3

11 1

360

LOCATE

370

X = X -T K

380

LOCATE

1 , 1 0 : PH I N T

" T h e r' e " ;

390

IF

THEN

P R I NT

"

is

I NT

..

400

IF

PR I NT

11

b a rre 1 " ; E L S E

PR I NT

X=1

are " ; X ; X= 1

410

PR I NT IF

.,

X=1

430

GOTO

4 40

FOR

450

LOCATE

1

T HE N

b ar r e l s 1 1 ;

11

420

***1

1 , 8 : PR I NT

TK=2

460

GOTO F OR

480 * 11

LOCATE

490

FOR CLS

510

GOTO

..

t ak e " ; TK

; X ; ELSE

PR

11

470

250 W= l

4 70

�i0 0

l ef t THEN

wi l l

TO

700 : NE X T W 11 * * * *

Y ou

700 : NE X T W 11 * * * *

I

20 , 1 : PR I NT

Win

*

490 W= 1

TO

2 0 , 1 : P R I NT

L= 1

TO

1 00 0 : NE X T

1 20

• 65

L

Win

***


I

11111111111 :

GAMES FOR YOUR

MSX

:11111111111!

INFERNO A 30-storey skyscraper is on fire and you, as Fire Chief, must save the 10 people who are still trapped in the burning building. As they jump from the windows, you must catch them in your blanket. To move the blanket, press the cursor controls on the right side of the computer.

66 --

-- --


I

11111111111 :

:1111111111 1 1

INFE RNO

10 20

REM REM

************************ * I n f er n o *

30 40

REM REM

*S . *

50

REM REM

************************ * I n i t i a l i se v ar i ab l e s *

70

REM

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

80

P = 0 : S= P

60

V i n c en t & G . 1 98 4

C ar t e r * *

9 0 F = 1 : 8= 9 1 00 E = 1 0 : C L S 1 10 1 20

REM REM

* Pr i n t s c r e e n * ************** OFF

1 30

KE Y

1 40

COLOR

1 50

LOCATE

1 60

FOR

10 , 1 , 1

X =3

1 70

LOCATE

1 80

NE X T

1 90

LOCATE

200

FOR

S T R I N G $ < 36 , 1 1 ,... 1 1 >

0 , 2 1 : P R I NT TO

20

1 , X : P R I NT

11 1 1 I I 1 1 11

X TO

_

/ 11

210

LOCATE

20 : NE X T T G , F : P R I NT 1 1 :.i! 1 1

220

LOCATE

E - 1 , 20 : PR I NT

230

REM

* Ch e c k

240

REM

25 0

I $ = I NK E Y $ : I F

*********************** l $ = 1 1 11 T HE N 2 6 0

IF

T= l

11 \

E - 1 , 2 0 : P R I NT

ASC ( l $ ) =28

T HE N

260

IF

270

l $ = I N K E Y �: : I F

IF

E >3 1

f or

THEN

ASC < I $ ) =29 E< 10

key

IF

290

I NTERVAL

THEN

300

ON

310

LOCATE

E=3 1 I $= 11 11

320

F =F + l

330 340

I F F > l B THEN H = R N D < - T I ME >

THEN

E=E- 1 . 5

E= 1 0

ON

I NT E R V AL = !

11

ELSE

E=E+ 1 . 5

THEN

280

11

p res sed *

GOSUB

G , F : PR I NT

11

370

350

G = G + I N T < RN D < 0 > * 4 > - 1

360

IF

G< 10

THEN

G= 1 0

370

IF

F=2 1

THEN

390

380

GOTO

1 90

67

11

850

280

ELSE


I

11111111111 : 390

P = F' + 1 G=E

G=E- 1

400

IF

410

REM

* De a d ! * *******

420

REM

430

LOCATE

440

FOR

4 �i 0

OR

THEN

460

LOCATE

1 6 , 1 7 : PR I NT

LOCATE

1 2 , 9 : PR I NT

of . . ; F'

480

F OR

490

IF

T= 1

TO

P= 1 0

500

C L S : GO T O

510

REM

* Caug h t *

520

REM

********

530

S=S+ l

540

F OR

550

LOCATE

Q= 1

560 570

NE X T GOTO

16 , 17

S F' C ( 6 ) : NE X T R 1 1 S c ore = " ; S ; " o u

1 000 : NE X T

THEN

530

1 1 81 1

G , 2 1 : PR I NT

R = 1 T O 90 : L OC A T E 11 P R I N T 1 1 Sp l a t !

470 t

: 11111111111 1

MSX GAMES FOR YOUR

T

600

90

TO

50

1 4 , 7 : PR I NT

" We l l

c a u g h t ! ..

Q 470

580

REM

* En d

590

REM

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

600

CLS

610

FOR

620

PR I NT

630

NE X T

640

FOR

of

g a me *

X=1

TO 2 1 1 S T R I N G $ ( 36 , " * 1 )

X K=7

TO

13

6 5 0 L OC A T E 4 , K : P R I N T 660 NE X T K

SPC < 2 8 )

670

" Y our

e

L OC A T E

is

680

LOCATE

mat ed 690 n e �·� t

5 , 8 : PR I NT

f i na l

sc ar

" ;S 5 , 1 0 : P R I NT

" Y ou

wi l l

" y ou

do

be

de

un l ess "

LOCATE

5 , 1 1 : PR I NT

b et t er

t i me . ••

700

GOTO

710

FOR

720

LOCATE

" : LOCATE

750 K= 1

TO

60

0 , 1 0 : PR I N T . . We l l 0 , 1 0 : P R I N T SPC < 1 5 )

68

d on e !


I

11111111111 : 730

GOSUB

740

NE X T

750

F OR

760

RUN

: 11111111111 1

INFERNO

790 K

T= 1

TO t op

2 5 0 0 : NE X T of

old

T

770

REM

* On

780

REM

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

Smok e y *

790

PLA Y

11 t 1 6 0 1 1

800

PLA Y

" o4 1 4 c t 25 5 1 6 4 r t 1 6 0 1 4 c e g o5 1 2c

. o4 a . " 810

PLA Y

1 1 1 2 r l 4 f t 25 5 1 6 4 r t 1 60 1 4 1 1

820

PLAY

11 f g a l 2 g . g . g "

830

PLA Y

1 1 1 4 c t 2 5 5 1 6 4 r t 1 6 0 1 4c e g l 2g . d . l

4 d d e f ed l 2c . c . c 11 840

RETURN

850

COLOR

9 , 1 , 1

860

COLOR

1 1 , 1 , 1

870

R E T UR N

69


I

11111111111 :

MSX GAMES FOR YOUR

: 11111111111 1

ALLSORTS This program is an example of a computer sort known as the Bubble Sort, because the lighter elements of the array bubble up to the top. This version was written by Andrew Ogilvie, and it can be amended in a number of ways. To sort a list in descending order, change the '<' in line 260 to a '>'. If you want to sort a list of numbers instead of strings, just delete all the dollar signs ($) in the program listing.

l ilt REM 2 JZI REM 30 REM 4 121 REM ��0 REM

***************** * So r' t i n g P r o g r a m * * ���������������* * An d r e w O g i l v i e * *****************

70


I

l l l l l.l l l l l l : 6121

DIM

7121

W I DTH

80

KEY

90

CLS

1 00 1 10

N $ < 1 121 121 > 40

OFF TAB < 7 > ; " Sort i n g Prog ram " ,... ,... ,... ,... ,... ,... ,... ,... ,... 1 1 11

P R I NT

F' R I 1\1 T T A B ( 7 )

'""' .... ..., '"·' '""' '""'

·

!I

P R I N T : P R I N T : I N P U T 11 E n t e r o f i t em s t o s o rt 11 ; N

1 20 r

: l l l l lllll l l1

ALLSORTS

1 30

IF

I NT < N > < > N

1 40

IF

N<0

1 50

PR I NT

1 60

FOR

1 70

P R I N T " I t em

lBIZI

OR

I=l

I NP U T

TO

N

N$ ( I )

No

1 90

NE X T

200

CLS

210

F' R I NT " P l e a se

11

I

2 2 121

REM

* So r t *

230

REM

******

THEN

N > 1 00

TO

wa i t ,

11

1 20

"

2 4 121

FOR

I=1

FOR

J= I + 1

260

IF

270

K $ = N $ < I ) : N $ < I ) = N $ ( .J )

N

N$ < I > < N$ ( J )

THEN

290

280

N $ ( .] ) = K $ NE X T

3 0 121

REM

* F i n i shed

310

REM

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

CL. S FOR

34 0

1=1

3 �5 121

NE X T

360

PR I NT

370 380

I

TO

390

GOTO KEY

410

END

Sort i n g *

N

I ; T A B ( �i ) ; N $ < I )

I N P U T 11 See I F D $ = 1 1 n 11

4 0 121

I

J : NE X T

F' R I N T

th i nk i ng

N- 1 TO

2 9 121

320

;

I 'm

250

330

n um b e

1 20

T HE N 11 ; I ;

the

l i st OR

aga i n

D $ = 11 N 11

310 ON

71

( y /n ) T HE N

" ; D$

4 00


I

11111111111 :

GAMES FOR YOUR

MSX

: 11111111111 !

NIGHT FIGHTER Warning . . . warning . . . Incoming aliens have threat足 ened to destroy the earth. How long can you delay their almost inevitable victory? You have only a flickering (and somewhat faulty) radar screen to warn you of their approach. To make matters worse, each time you manage to destroy an attack wave, the next wave increases its speed. Use the joystick to control your weapon. You are able to adjust the enemy attack speed; a level of 200 is incredibly easy, while one of 1 5 (or less) will take all your skill to control.

72


1 111111 11111: 10

REM

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

20

REM

*N i ght

30

REM

* ������������� *

40

REM

*D .

F i g h t er *

P i l l i n g er *

50 REM

*

D .

O l es h

*

REM

*

G .

C a r t er

*

60

: 11111111111 1

NIGHT FIGHTER

70

REM

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

80

KE Y

OFF

90

CLS Var i ab l es *

1 00

REM

* I n i t i a l i se

1 10

REM

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

1 20 1 30

Z = R N D < - T I ME > I NP U T 11 L ev e l

1 40

A=0

" ; LEV

1 50

B = I NT

< RND < 1 > * 1 0 ) +5

1 60

D= I NT

< RN D < 1 > * 1 5 > + 8

1 70

C=32

1 80

Y=10

1 90

REM

* Re a d

200

REM

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

210

R D = S T I C l< ( 1 ) : F = S T R I G ( 1 ) I F RD= l THEN Y = Y - 1

220

IF

LDCATE

250

CLS IF

270 11

L OC A T E

280

SOUND

SOUND

3 , Y : PR I N T

F < >- 1

260

Y=Y+1

THEN

RD=5

230 240

i nput *

THEN

" ? ••

320

4 , Y : PR I N T

" - -- - - - - - - - - - - - - -

0 , 20 : S O U N D 7 , 6 3 : S O U N D 1 2 , 30 : SOUND 1 3 , 9 490

290

IF

Y =B

THEN

GOSUB

300

IF

Y =D

THEN

G O S U B 500

310

IF

B=30

320

PC=PC+ l : I F

D=30

AND

8 , 16 :

THEN

P C < = LE V

450

THEN

1 90

E L SE

F' C = 0 330

IF

B < 30

THEN

B = B + I NT < RN D < 1 > * 3 + 1 )

340

IF

D < 30

THEN

D=D+ I NT < RND < 1 > * 3- 1 )

350

C=C- 1

360

CLS

73


I

11111111111:

GAMES FOR YOUR

: 1 1 1 1 1 1 1 1 1 11 1

MSX

370

IF

B < 30

THEN

L OC A T E

C , B : F' R I NT

380

IF

D < 30

THEN

LOCATE

C , D : F' R I N T

390

IF

C >2

400

REM

*End

410

REM

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

420

PR I NT

" Th e

W or l d

h as

P R I NT

" Th e

N i ght

F i g h t er

11

=" THEN of

"? : Jl -

r? :

1 90 Game * b een

Demo l i s

hed " 430 "

h ad

" ;A ;

a t t em p t s . "

440

STOP

450

A=A+ 1 GL= 1

TO

5 : NE X T

460

F OR

470

L E V = L E V -L E V / 3

480

GOTO

490

SOUND

: SO U N D 500

1 50 6 , 3 1 : SO U N D

7 , 54 : SOUND

12 , 10

1 3 , 9 : B= 30 : RE T U R N 6 , 3 1 : S O U N D 7 , 5 4 : SO U N D 1 3 , 9 : D=30 : RETURN

SOUND

: SO U N D

GL

74

12 , 10


I

11111111111 :

STOC K MARKET

:11111111111 1

STOCK MARKET In this program written by Paul Precious you can buy and sell shares in four concerns. The game is for two people, with the computer calculating the value of the shares and also telling you which of the players has won.

75

]


I

lllllllllll:

MSX GAMES FOR YOUR

: l l l l l ll l l l l l

10

REM

* St oc k

20 30

REM REM

* B y P . P r e c i ou s & G . C a r t er * ****************************

40 50

DIM

A ( 1 2 > , P ( 4 ) , N$ < 2 >

REM

* Se t

60

REM

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

70

COLOR

80

I<E Y

90

CLS

1 00 1 10

Mark et *

up

t it le

sc r e e n *

12 , 15 , 12

OFF

LOCATE LOCATE

9 ., 6 : P R I N T 9 ., 7 : PR I N T

S T R I NG $ ( 1 4 ., " £ " ) " £ S t o c k M ar k e t £ " S T R I NG $ ( 1 4 ., " £ " )

1 20

LOCATE

9 ., 8 : PR I NT

1 30

LOCATE

0 ., 1 5 : I NP U T

rst

p l a y er ' s

1 40

I NP U T

s

" Wh at

1 50

I NP U T

" Ho w

f or IF

1 70

LOCATE

i s

the

muc h

N N > = 1 00 0

p l ease

sec o n d

do

THEN

f i

p l a y er '

y ou

want

to

pl

t oo

lo

1 90

0 ., 1 9 : PR I NT e n t er

" Th at

is

aga i n . "

1 80

GOTO

1 90

FOR

200

A < I > = 1 00 : P < I > = 1 00 0

210

NE X T

220

REM

230 REM

the

£ " ; NN

1 60 w ;

is

" ; N$ ( 1 )

" ; N$ ( 2 )

n am e

ay

" Wh a t

n ame

1 50 I=1

TO

4

I * I n i t i a l i se

v a r i ab l e s *

********************** < - T I ME >

240

B=RND

2 �i 0

FOR

260

H = R N D < 1 > : H= I N T < 4 * H > + 1

270

IF

H= 1

THEN

280

IF

H=2

THEN

A$= " D i amon d s "

290

IF

H=3

THEN

A $ = " We a p o n s " A $ = 1 1 B r i t i sh Te l e c om 11

.]= 1

TO

2

300 I F H=4 THEN 3 1 0 I<= I N T ( .J * 4 + H )

A $ = " P l an es "

320

REM

* D i sp l a y

330

REM

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

sc reen *

340

CLS

350

LOCATE

0 ., 4 : PR I NT

76

11 Stoc k

M a r k e t " ., .]


I

11111111111 : 11 ; N$ <

; 11 > 11 ; 11

.] >

F' R I NT : F'R I NT

360

apons

D i amon d s

1 1 £ 11 ; A < 1 > ; TA B ( 7 ) ; 11

We

P R I NT : PR I N T

11 1

.

£ 11 ; A < 2 > ; T £ .. ; A < 4 )

£ 11 ; A < 3 > ; T A B < 2 6 > ; 11

AB < 1 7 > ; 11 380

11 F' l a n e s

B . Te l ec om 11

P R I NT

370

: 111111111111

STOCK MARKET

. ; A ( 5 ) ; T AB < 7 > ; A ( 6 )

; T A B < 1 7 ) ; A < 7 > ; T AB ( 26 ) ; A < 8 > P R I NT : PR I N T

390

11 ; A ( 9 ) ; T AB < 7 > ; A < 1 0

11 2

> ; T A B < 1 7 > ; A < 1 1 > ; T A B < 26 > ; A < 1 2 > Y =A < l > * A < 9 > +A < 2 > * A < 1 0 ) + A < 3 > * A < 1 1 )

400

+A < 4 > * A < 1 2 > X =A < 1 > * A < 5 > +A < 2 > * A < 6 > + A ( 3 > * A < 7 > +A

410

< 4 > *A < 8 > L OC A T E

420 s :

0 , 1 2 : P R I NT

" V a l ue o f

Sh are

£. 11 ;

430

IF

THEN

PR I NT

X

440

P R I NT : PR I N T

11 Cash

on

J= 1

P R I NT

ELSE

Y

£. " ; P ( .J

h an d

) IF

450 ; 11

has

460

P R I N T : PR I N T

THEN

P < J > >NN

w on . 11 : G O T O

P R I NT : F'R I N T

N$ ( J )

740 " ; A $ ; 11

Bu

B $ = 11 S E L L 1 1 )

TH

.. Ho l d i ng s

.

y / Se l l ? .. 0 , 1 7 : I NF' U T

B$

470

LOCATE

480

IF

B$= " N 11

490 500

IF IF

B$= .. Z " THEN 740 N O T ( B$ = 1 1 B U Y 1 1 O R

EN

THEN

460

530

IF

B $ ; . . h ow N B$= 11 S 11 THEN

540

IF

P < J > <A < H > *N

550

GOSUB

560

GOTO

510 520

PR I NT I NP U T

570 REM 580 REM 590 600 ave

680

man y

THEN

..

;

590 500

700 680

* Ca n y ou a f f or d i t ? * ********************

N < =A < K > T H E N 6 5 0 A < K > = 0 T H E N P R I NT an y t o se l l . 11 : LOCATE IF IF

0

77

11 Y ou

d on ' t

0 , 1 5 : GOTO

h 46


I

11111111111 : 610

" That

PR I NT

: 11111111111 1

X GAMES FOR YOUR MS

t oo

is

en t er

man y ;

ag

a i n . .. 620

L OC A T E

630

REM

0 , 1 5 : GO T O

460

* C a s h , n o . , v a l u e o f s h a re s * ****************************

640

REM

6 50

N=-N

660

GOSUB

670

IF

680

NE XT

J

690

GOTO

250

700

P < J > = I N T < P < J > -A < H > * N >

710

A < K > = I NT < A < K > +N >

720

F = R N D ( 1 > : A < H > = I NT ( < A < H > + I NT < F * 50 >

700 A <H> =10

THEN

A <H> < 10

- 1 0 > * N/ 4 ) 730

RETURN

740 Z$

PR I NT : I NPUT

750

IF

Z $= " Y "

" An o t h e r

T HE N

RUN

78

g am e

ELSE

< YIN> " ;

END


I

11111111111 :

TE LEPHONE BOOK

: 11111111111 1

TELEPHONE BOOK One of the most powerful features of the BASIC language is its ability to read stored data using READ, DATA and RESTORE commands. To demonstrate how this works, Andrew Ogilvie has written a program to store a personal telephone directory. You must type in your data at the end of the program, using line numbers starting at 3 10. When the program is run, you simply type in the surname of the person you wish to call, and their name and number are displayed on the screen.

79


I

1111111 I I l l : 10

REM

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

20 30 40 50

REM REM REM REM

* T e l ep h on e B o o k * ����������� ��� * * * An d r e w O g i l v i e * ****************

60

REM

70

CLS

80

LOCATE

90

P R I N T : PR I NT I NP U T . , En t er

1 00 n ow

the

tel .

surn ame y ou n u mb e r f or :

1 10

RESTORE REM

* Se a r c h

1 30

REM

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

1 40

READ

1 50

f or

1 60

IF

GOTO

N$=S$

1 80

CLS

1 90

REM

200

REM

THEN

2 40

1 80

1 40 * Pr i n t

d at a *

210 220

P R I NT

230

P R I NT . , T e l .

240

P R I NT : P R I NT : P R I NT

250

P R I NT " An ot h er

260

I NP U T

270

IF

D$ D$= 11 n "

280

IF

S $ = " en d "

y

n ot

No .

OR

" ; N$

: " ; T$ go

( y/n )

D$= ., N " THEN

l i s t ed . " : G O T O

GOTO

k

P R I NT : P R I NT . , S o r r

THEN

************ P R I NT " N a m e : 1 1 ; I $ ; " .

290

to

d at a *

l i st ed . " : GOTO

1 70

w i sh " ; S$

N$ , I S , T$

N $ = . , en d "

IF n ot

Book 11

7 , 0 : P R I NT " T e l ep h o n e

1 20

y ,

: 111111111111

X GAMES FOR YOUR MS

" ;

THEN

300

P R I NT : PR I N T " Sorr 230

20

300

END

310

DATA

0 g i l v i e , A , 4 1 5- 9 2 6 5 6

320

DATA

C a r t er , G , 8 7 3 - 93 2 1 p o l i c e , t h e , 99 9

330

D ATA

340

D A T A h os p i t a l , t h e , B9 7 - 4 6 5 4

350

DATA

e n d , of , d a t a

80


I

11111111111:

GRAPHICS DE MONSTRATIO N

:11111111111 !

GRAPHICS DEMONSTRATION The following programs demonstrate some of the most spectacular features of MSX machines - their colour graphics.

81


I

11111111111:

GAMES FOR YOUR

: 1 1 1 1 11 1 1 1 11 1

MSX

WAVE FORM This program illustrates the power of the LINE command in the high resolution graphics mode and is possibly the best one in this section. The program is very fast, and the effect is quite hypnotic. Wave form's shape is determined randomly, so it will differ from run to run. 10 20 30

REM REM REM

************** * Wave Form * * ���������� *

40

REM

* D . P i l l i n g er , *

50

REM

*D .

O l esh

60

REM

*G .

Carter

70

REM

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

80

F OR

X= l

90

COLOR

TO

&

* *

1 000 : NE X T

X

1 , 1 , 1

1 00

CLS

1 10

SCREEN

1 20

X = I NT < RND < 1 0 > * 255 )

2

1 30

Y = I NT < RND < 1 0 > * 1 7 5 >

1 40

L = I N T < RN D < 1 0 > * 2 5 5 )

1 50

M = I NT < RN D < 1 0 > * 1 7 5 >

1 60

U= 1 5 : V=7

1 70

DEF

1 80

GOSUB

1 90

FOR

Q=2

TO

16

200

F OR

8= 1

TO

1 50

210

N U M = N U 1'1 - 1 .

F NR < X > = I N T < RN D < l > * X >

220

IF

230

L I NE

360

NUM=0

THEN

GOSUB

360

( X , Y ) - < L ., M > , Q

240

IF

I NK E Y $ = "

250

IF

X +A >255

OR

X +A < 0

T HE N

260

IF

Y +B > 1 75

OR

Y +B <0

THEN

B=-B

270

IF

L+C >255

OR

L+C <0

T HE N

C=-C

280

IF

M+D > 1 75

OR

M+C <0

THEN

D=-D

"

T HE N

82

370 A=-A


I

11111111111:

:11111111111 1

WAVE FORM

290

X = X +A : Y = Y + B

300

L=L+C : M=M+D

310

NE X T

320

FOR

330

CLS

G VV= l

TO

340

NE X T

3 �5 0

IF

360

A=FNR < U > -V

370

B=FNR < U > -V

300 : NE � T

VV

Q

I NKE Y $ = "

380

C = F NR < U > - V

390

D = F NR < U > - V

"

THEN

400

NUM=FNR < 20 ) + 1 0

410

RETURN

83

370


I

11111111111 :

GAMES FOR YOUR

MSX

: 11111111111 1

GRAPHICS This graphics program illustrates the computer's speed and accuracy, and makes good use of the high resolution graphics in Mode 2. You might like to add a variable for colour, and make up a loop to make the pattern appear in different colours. 10

REM

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

20

REM

*

30

REM

*

40

REM

*D .

Graph i c s

*

����� -- -

*

P i l l i n g er ., *

&

50

REM

*

D .

O l esh

60

REM

*

G .

C a r t er .

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

70

REM

80

CLS

90

COLOR

1 00

* *

1 , 1 ., 1 2

SCREEN

1 10

FOR

1 20

L I NE

1 40

L I NE

I=1

TO

1 75

S T EP

4

/( 0 ., I > < 2 5 �� - I ., I -· I > ., 3 1 3 0 L I NE < I , 0 > - < I + < 2 5 5 - I > ., 0+ I > ., 3

3 1 50

L. I N E

-�

< 25 5 - I ., 1 7 !:i ) - < I - 2 5 5 - I ., 1 75 - I ) .,

< I ., 1 7 5 > - < I + 2 !:i 5 - I ., 1 7 5 - I > , 3

1 60

NE X T

I

1 70

GOTO

1 70

84


1

11 1 1 1 11 1 11 1 :

TIME 'S EYE

:1 1 1 1 1 1 1 1 1 1 1 !

TIME'S EYE Before drawing the picture, the program calculates the point positions. It puts them in an array and then plots the graph.

85


I

11111111111:

MSX GAMES FOR YOUR

10

REM

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

20

REM

*

T i me ' s

Eye

*

30

REM REM

*

����������

*

40

P i l l i n g er , * * D . O l esh &

*D .

50

REM

*

60

REM

*

70

REM

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

80

COLOR

90

SCREEN

1 00

: 11 1 1 1 1 1 1 1 1 1 1

G .

Cart er .

*

1 , 1 , 1 2

A < 36 > , B ( 36 >

DIM

1 10

L = 1 2 0 : .J = 8 0

1 20

FOR

H= 1

TO

5

1 30

FOR

N= 1

TO

36

1 40

K=N / 1 8 * 3 . 1 4 1 5927#

1 50

A < N > = 1 28 + L * S I N < K >

1 60

B < N > = 8 8 + .J * CO S ( K )

1 70

PSET

1 80

NE X T

<A <N> ,B <N> ) ,3 N N= 1

1 90

FOR

200

M=N+ 1 2

210

IF

220

TO

36

L I NE

M = M- 36 <A (N) ,B (N> > - <A <M> ,B <M> > ,6

230

NE X T

N

240

L = L / 2 : .J = .J / 2

M > 36

250

NE X T

H

260

GOTO

2 60

THEN

86


I

1 1 1 1 11 1 1 1 1 1 :

J D HAT

: l l l l l l l l ll l l

3D HAT This program draws a three-dimensional Mexican hat on the screen. It takes a while to complete, but the wait is worth it.

87


I

11111111111 :

UR MSX GAMES FOR YO

10 20

REM REM

************** * 3D HAT *

30

REM

*

40

REM

* D . P i l l i n g er , *

����� �

*

50

REM

*D .

60

REM

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

70

CLS

80

DEF

90

PR I NT

: 111111111111

O l esh

*

FNA < Z > =3 2 * S I N < Z / 6 ) .. Reso l ut i on

1 00

I NP U T

1 10

SCREEN

1 20

CLS

1 30

F OR

1 40

.] = 0 : K = 1

< 1 - 1 0 ) .. .

R 2

X = - 1 00

TO

1 00

1 50

V = R * I N T < S QR ( ( 1 0A 4 > - X * X > / R )

1 60

FOR

1 70

¥ - V T O -V S T E P - R Z = I NT < 80 + F N A < S Q R < X * X + Y * Y > > - . 7 071

Y > 1 80

I F

1 90

.J = Z

Z <J

THEN

1 90

200

PSET < X + 1 1 0 , Z )

210

K=0

220

NE X T

Y

230

NE X T

X

240

GOTO

240

88


I

1 1 1 1 1 1 1 1 1 11 :

EYE

: 1 1 1 1 1 1 11 1 1 1 1

EYE This pregram shows how arrays can be used to store data which will be used to create a graphic display. The pattern produced is like a devil's eye. As the hole shrinks, the speed increases and the wheel develops.

89


I

11111111111:

GAMES FOR YOUR

10

REM

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

20

REM

*

30

REM

*

40

REM

* D . P i l l i n g er , *

: 1 11 1 11 1 1 1 1 1 1

*

Eye

*

&

*

50

REM

*

D.

O l esh

60

REM

*

G .

Cart er .

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

70

REM

80

SCREEN

90

COLOR

1 00

MSX

*

2 1 ,7 ,7

CLS

1 10

DIM

A < 12> ,B < 12>

1 20

FOR

N= l

1 30

K =N / 6 * 3 . 1 4 1 59 2 7 #

1 40

A < N > = 1 2 8 + 8 IZI * S I N < K > : B < N > = 8 8 + 8 0 * COS

TO

12

<K> 1 50

PSET < A < N > , B < N > >

1 60

NE X T

1 70

F OR

N= 1

TO

12

1 80

FOR

M= l

TO

12

N

1 9 0 L I NE < A < N > , B < N > > - < A < M > , B < M > > M

200

NE X T

210

NE X T

N

220

GOTO

220

90




I

1 11111111111:

WRITING PROGRAMS

;111111111111'

How To Write Better Programs Compiled by Tim Hartnell

It ' s all very well spending your time typing in programs like those in this book, but there is sure to come a time when you decide you ' d like to develop some games pro­ grams of your own . In this section of the book , I ' d like to discuss a few ideas which may help you write g?mes which you' ll both enj oy developing and - more impor­ tantly - you and your friends will enj oy playing . HAVE A CLEAR GOAL I N MIND

Although in many (perhaps most) cases, your computer program will take on a life of its own as you write it , developing away from the concept you had in mind when you started programming, it is important at the outset to have a pretty good idea of what your game will involve . This is not as obvious a suggestion as you might think . Of course , you ' ll know if you' re developing a ' chase the ghosts around the maze as you eat the power pills' pro­ gram that you are going to need a different sort of pro­ gram layout to one which places you inside a H aunted Oak, peopled with gremlins and halflings . But you have to go beyond the basic ' ' I ' m going to write me an Ad ven­ ture ' ' stage to work out such things as (a) what the object of the game will be; (b) what the screen display will look like ; (c) what variables, and variable names, you ' ll need ;

93


I

11111111111:

MSX GAMES FOR YOUR

:11111111111 1

(d) the nature of the player input ; (e) how ' winning' or ' los足 ing ' will be determined ; and so o n . Let ' s lo o k a t these o n e b y one . THE OBJECT OF THE GAME

This can usually be stated very succinctly : " To find the lost treasure of the Aztecs" ; " To destroy as many asteroids as possible before running out of ships' ' ; or ' ' To play a game of chess ' ' . But even though this stage of the game production can be accomplished very quickly, it should not be overlooked. Get this statement - which might be j ust a sentence , or may run to a paragraph length or more , if there is more than one ' screen ' to be worked through , with a different scenario for each screen - down in writing . Y o u may well discard the original aim as the program develops , and it looks like the direction it is taking is bet足 ter than the one you first thought of. Despite this , it is im足 portant to have something concrete to aim at , to stop you wasting hour after hour doodling aimlessly . THE SCREEN DISPLAY

I ' ve found that making a sketch , or sketche s , of what the display will look like once the program is up and running, is of tremendous benefit . Once you have your drawing, and it doesn ' t matter how rough it is so long as it shows all the important things you want on the screen , and their relative positions and size , you ' ll discover the program concept is likely to crystalize . As well as seeing immediately how you will write parts of the code to achieve the game ' s aim, you ' ll get an idea of whether or not the game is even worth writing in the form you had considered . Perhaps the game will be too complex if you leave everything on the screen you were intending to ; or maybe most of the screen will be wasted space , so that a more complicated game scenario should be devised .

94


'1 11111111111:

WRITING PROGRAMS

: 1 1 1 11 1 1 1 1 1 1 1 1

I ' ve discovered that sketching the proposed screen display before starting to program is particularly useful , especially when creating arcade and simulation games . Y o u get a n indication o f the variables you ' ll need, the user-defined graphics , the kind of player inputs which will be most conducive to good player interaction, and so on . Simulation games , as you probably know, are those in which the computer models an external reality - such as running a cake shop, a war , or an airport - and allows you to experience (after a fashion) what it would be like to take part in such an activity in real life . Simulation games are not particularly difficult to write - in terms of needing clever coding - but instead demand a methodical , pain足 staking approach to the program . In my book Th e ZX Spectrum Explored (Sinclair Browne , 1 982) , there is a program with the unlikely name of ' Workin ' for the Man ' , in which you are running a fac足 tory , staffed with a highly-erratic workforc e, involved in the manufacture of some mythical product called ' The Zibby ' . The player gets a factory report two or three times a wee k , and from this report has to decide how many staff he or she will hire or (attempt to) fire , how many Zibbies will be the production target for the week , and so on. This report is the key to the program , and when f wrote the game , I started by making a sketch of how the screen would loo k . It was a bit like this : FACTORY REPORT : WEEK 5 Capital in hand is $2 , 65 7 . 92 Your stores hold 1 2 Zibbies worth $ 1 69 . 68 They sell for $ 1 4 . 1 4 each and cost $ 7 . 4 1 each to make Workforce is 7 people Their wages are $4 1 each and the wage bill this week is $287

95


I

11111111111:

X GAMES FOR YOUR MS

:11111111111

Each person can make l 0 Zibbies a wee k , a total output of 70 Once I had this sketch drawn up , I was ready to go . As you can see , it gives a very good indication of the variables which will be needed . For a start , I know I ' ll have to control the number of the wee k, the capital , the contents of the stores (and their value) and so on . I found that once I ' d completed the screen display sketch , the rest of the program was relatively easy to write . Doing a sketch in this way gives you an instant guide to the main variables you ' ll nee d . USE HELPFUL VARIABLE NAMES

I also tend to use variable names which relate in some way to that which they are representing , as it saves hav足 ing to keep a list of the variables which have been assign足 ed, and what they ' ve been assigned to . For example , I could use WK for week , CH for capital in hand , MZ for the cost of making each Zibby and SZ for the selling price. If Z was the number of Zibbies , I would know that the total value of Zibbies I had was Z (the number of them) multiplied by SZ (their selling price) and it cost me Z multiplied by MZ (their price of manufacture) to make them. My profit , if I sold them all , would then be Z*SZ minus Z*M Z . If you follow a similar ide a , you ' ll find i t i s much easier to keep track of what is happening in your program than might otherwise be the case . THE NATURE OF THE PLAYER INPUT

It ' s important to make games easy and fun to play . It ' s not good having the best Asteroids-derivative program in the world if players have trouble hitting the fire button because you ' ve placed it right next door to the ' rotate ' control . Many programs which provide ' up ' , ' down ' , ' right ' and

96


1 1 1 11 11 1 1 1 1 11 :

WRITING PROGRAMS

: 1 1 1 11 1 11 1 11 1 '

' left' controls , automatically use arrow or cursor keys , even though these might be most inconvenient for the player to use . Have a look at your keyboard , and see if you can find better ones. I often use " Z " and " M " for pro足 grams which need j ust left and right movement , with the space bar for fire . These keys seem logical to me , and no player time is wasted in learning them, or trying to remember them when the game is underway . In a similar way , I tend to use ' ' A ' ' (for up) and ' ' Z ' ' (for down) for the left hand, and the " greater than " and " less than " keys for left and right (pointing out to the player that the < and > symbols point in the relevant directions) . Use INKEY$ or GET$ whenever you can , to prevent the player from having to use the RETURN or ENTER keys to get the program underwa y. HOW THE GAME WILL END

The way the game will be won and lost needs to be defin足 ed, and clear to the player. Do you need to blast all the aliens to win , and will you lose automatically if one alien lands, and you ' ve still got ships left , or only if you have no ships left . In a two-player game , is the loser the first player to lose three lives , or seven pieces , or does the game only end when the differen ce between the two scores is three or seven or whatever . Work this out , and make i t very clear t o the player. Whether the goal of the game is to clear the left-hand side of the screen of the Screaming Widgies, or to clock up a fortune of $ 7 . 3 billion, it must be both clear to the player, and possible t o achieve . A ' win condition' which can never be achieved on the higher levels of play is most unsatisfactory . No matter how difficult it is to do , you are only defrauding players if you set goals whose achieve足 ment is not possible within the constrictions you ' ve put in足 to the game . I hope these five points may give you a few ideas on how you can go ahead and write programs which will be relatively easy to write , and which will be satisfying for you and your friends to play .

97



I

1 1 11 1 1 1 1 1 1 11 :

GLOSSARY

: 111 1 11111111!

GLOSSARY A Accumulator - the place within the computer in which

arithmetic computations are performed and where the results of these computations are stored . the series of steps the computer follows to solve a particular problem .

Algorithm

-

Alphanumeric - this term is usually used in relation to a

keyboard , as in ' it is an alphanumeric keyboard ' , which means that the keyboard has letters as well as numbers . It is also used to refer to the ' character set ' of the computer. The character set comprises the numbers and letters the computer can print on the screen . ALU (Arithmetic/Logic Unit) - the part o f the computer

which does arithmetic (such as addition , subtraction) and where decisions are made . AND - a Boo lean logic operation that the computer uses

in its decision-making process. It is based on Boolean algebra , a system developed by mathematician George Boole ( 1 8 1 5-64) . In Boolean algebra the variables of an expression represent a logical operation such as OR and NOR . ASCII - stands for American Standard Code for

I n for m a t i o n E x c h ange , the m o st widely u s ed e n c o d i n g s y s t e m fo r E n g l i s h l a n g u a g e 路 alphanumerics . There are 1 28 upper and lower case letters , digits and some special characters. ASCII converts the symbols and control instructions into seven-bit binary combinations. Assembler - a program which converts other programs

written in assembly language into machine code (which the computer can understand directly) .

99


I

11111111111:

X GAMES FOR YOUR MS

: 11 1 11 11 11 1 1

Assembly language is a low level programming language which uses easily memorised combinations of two or three letters to represent a particular instruction which the assembler then converts so the machine can understand it . Examples of these are A D D ( ad d) , and S U B ( subtract) . A co m pute r programmed i n assembly language tends t o work more quickly than one programmed in a higher level language such as BASIC .

B - an acronym for Beginners All-Purpose Symbolic Instruction Code . It is the most widely used computer language in the microcomputer field . Although it has been criticised by many people , it has the virtue of being very easy to learn . A great number of BASIC statements resemble ordinary English .

BASIC

Baud - named after Baudot , a pioneer of telegraphic

communications. Baud measures the rate oftransfer of information and is approximately equal to one bit per second . BCD - an abbreviation for Binary Coded Decimal . Benchmark - a test against which certain functions of the

computer can be measured . There are a number of so足 called ' standard Benchmark tests' , but generally these only test speed. This is rarely the aspect of a microcomputer that is most of interest to the potential buyer . Binary - a numbering system that uses only zeros and ones. Bit - an abbreviation for Binary Digit . This is the smallest

unit of information a computer circuit can recognise . Boolean Algebra - the system of algebra developed by

mathematician G eorge Boole which uses algebraic notation to express logical relationships (see AND) . Bootstrap - a short program or routine which is read into

l OO


41 1 1 1 1 1 1 1 1 1 1 :

GLOSSARY

: 1 1 1 1 1 1 1 1 1 1 11 1

the computer when it is first turned on. It orients the computer to accept the longer, following program . Bug - an error in a computer program which stops the

program from running properly. Although it is generally used to mean only a fault or an error in a program , the term bug can also be used for a fault in the computer hardware . Bus - a number of conductors used for transmitting sig足

nals such as data instructions, or power in and out of a computer. Byte - a group o f binary digits which make up a

computer word. Eight is the most usual number of bits in a byte .

c CAI - Computer Assisted Instruction . CAL - Computer A ssisted Learning .

The term is generally used to describe programs which involve the learner with the learning process.

Chip - the general term for the entire circuit which is

etched onto a small piece o f silicon . The chip is , of course , at the heart of the microcomputer. Clock - the timing device within the computer that

synchronises its operations . COBOL - a high level language derived from the words

Common Business Orientated Language . C OBOL is designed primarily for filing and record-keeping . Comparator - a device which compares two things and

produces a signal related to the difference between the two . Compiler - a computer program that converts high

level programming language into binary machine code so the computer can handle it . Complement - a number which is derived from another

according to specified rules.

101


I

11111111111:

GAMES FOR YOUR

MSX

:11111111111

Computer - a device with three main abilities or

functions: l ) to accept data 2) to solve problems 3) to supply results CPU - stands for Central Processing Unit . This is the

heart of the computer ' s intelligence , where data is handled and instructions are carried out . Cursor - a character which appears on the TV screen

when the computer is operating . It shows where the next character will be printed . On a computer there are usually ' cursor control keys' to allow the user to move the cursor around the screen .

D information in a form which the computer can process .

Data

-

Debug - the general term for going through a program

and correcting any errors in it , that is, chasing down and removing bugs (see Bug) . Digital Computer -a computer which operates on

information which is in a discrete form . Disk/Disc - this i s a magnetically sensitised plastic disk ,

a little smaller than a single play record . This is used for storing programs and for obtaining data. Disks are considerably faster to load than a cassette of the same length program . The disk can be searched very quickly while a program is running for additional dat a. Display - the visual output of t h e computer , generally on

a TV o r monitor screen . a printer which prints either the listing of a program or that which is displayed on the TV screen . Each letter and character is made up of a number of dots. The higher the number of dots per character the finer the resolution of the printer .

Dot Matrix Printer

-

102


I

1 11 11 1 1 1 1 1 1 1 :

GLOSSARY

: 1 1 1 1 1 1 1 11 1 1 1 1

Dynamic Memory - a memory unit within the computer

which ' forgets' its contents when the power is turned off.

E Editor - this term is generally used for the routine within

the computer which allows you to change lines of a program while you are writing it . EPROM - stands for Erasable Programmable Read足

Only Memory . This is like the ROM in the computer, except that it is fairly easy to load material into an EPROM and it doesn ' t disappear when you turn the power off. E PROMs must be placed in a strong ultra violet light to erase them . Error Messages - the information given by a computer

where there is a fault in the coding during a part of a program , usually shown by the computer stopping , and printing a word, or a word and numbers , or a combination of numbers only, at the bottom of the screen . This tells you what mistake h as been mad e. Common mistakes include using t h e letter 0 instead o f zero in a line , o r leaving o ut a pair of brackets , or one of the brackets , in an expression , o r failing to define a variable .

F File - a collection of related items of information

organised in a systematic way . Floppy Disk - a relatively cheap form of magnetic disk

used for storing computer information , and so named because it is quite flexible (see Disk/ Disc) . Flow Chart - a diagram drawn up before writing a

program , in which the main operations are enclosed within rectangles or other shapes and connected by

1 03


I

11111111111 :

MSX GAMES FOR YOUR

: 111111111111

lines, with arrows to represef!t loops, and decisions written at the branches. It makes writing a program much easier because traps such as infinite loops, or non-defined variables can be caught at an early stage . It may not be worth writing a flow chart for very short programs , but generally a flow chart aids in creating programs. Firmware - there are three kinds of ' ware ' in computers :

software ' temporary ' programs; hardware like the ROM which contains permanent information ; and firmware in which the information is relatively permanent , as in an EPROM (see EPROM) . Flip-Flop - a circuit which maintains one electrical con足

dition until changed to the opposite condition by an input signal . FORTRAN - an acronym for FORmula TRANslation, this

is a high level , pro blem orientated computer language for scientific and mathematical use .

G Gate - an electrical circuit which , although it may

accept one or more incoming signals, only sends out a single signal . Graphics - pictorial information as opposed to letters

and numbers .

B Hard Copy - computer output which is in permanent

form . Hardware - the physical parts of the computer (also see

software and firmware) . Hexadecimal (Hex) - a numbering system to the base

sixteen . The digits zero to nine are used , as well as the letters A, B, C, D, E and F to represent numbers . A

1 04


1 11 11 11 11 11 1 1 :

GLOSSARY

: 11 11 1 11 11 11 1 1

equals 1 0 , B equals 1 1 , C equals 1 2 , and so on. Hex is often used by microprocessor users. Hex Pad - a keyboard designed specifically for

entering hexadecimal notation. High Level Language - a programming language which

allows the user to talk to the computer more or less in English . I n general , the higher the level of the language (that is, the closer it is to English) , the longer it takes for the computer to translate it into a language it can use . Lower level languages are far more difficult for human operators but are generally executed far more quickly.

I Input - the information fed into the computer via a key足

board , a microphone , a cassette or a disk. Input/Output (1/0 Device) - a device which accepts

information or instructions from the outside world , relays it to the computer, a n d the n , after processing , sends the information out in a form suitable for storing, or in a form which could be understood by a human being. Instruction - data which directs a single step in the pro足

cessing of information by the computer (also known as a command) . Integrated Circuit - a complete electronic circuit

imprinted on a semiconductor surface . Interface - the boundary between the computer and a

peripheral such as a printer. Interpreter - a program which translates the high level

language fed in by the human operator, into a language which the machine can understand . Inverter - a logic gate that changes the signal b eing fed

in , to the opposite one . Interactive Routine

-

part of a program which is

1 05


I

lllllllllll:

GAME S FOR YOUR MSX

: ll l l l l l l l l l

repeated over and over again until a specified condition is reached .

J Instruction an instruction which tells the computer to go to another part of the program , when the destination of this move depends on the result of a calculation j ust performed .

Jump

-

K K - this relates to the size of the memory. Memory is

usually measured in 4K blocks. l K contains l , 024 byte s . the trigger word in a line of programming, usually the first word after the line number. Keywords include STOP , PRINT and G OTO .

Keyword

-

L Language - computer languages are divided into three

sections : high level languages, such as BASIC , which are reasonably close to English and fairly easy for humans to use ; low level languages, such as Assembler, that use short phrases which have some connection with English (ADD for add �nd RET for return , for instance) ; and machine code which communicates more or less directly with the machine . this stands for Liquid Crystal Diode . Some computers such as the TRS-80 Pocket Computer use an LCD display .

LCD

-

LED - this stands for Light Emitting Diode . The bright

red numbers which are often used on watch or clock displays are made up of LEDs. 1 06


rl l l l l l l l l l l l :

GLOSSARY

: 1 11 1 1 11 1 11 11 1

Logic - the mathematical form of a study of relationships

between events . Loop - a se quence of instructions within a program

which is performed over and over again until a particular condition is satisfied .

M Machine Language or Machine Code - an operation

code which can be understood and acted upon directly by the computer . Magnetic Disk - see Disk and Floppy Disk . Mainframe - computers are generally divided into

three groups, and the group a computer falls into depends more or less on its size . The computer you are thinking of buying is a microcomputer ; medium sized computers are known as minicomputers; and the giant computers that you sometimes see in science fiction movies are mainframe computers . Until 1 5 years ago mainframe computers were , in practical terms , the only ones available . Memory - there are two types of memory within a

comput e r . The first is called R O M (re ad-only memory) ; this is the memory that comes already programmed on the computer , which tells the computer how to make decisions and how to carry out arithmetic operation s . This memory is unaffected when you turn the computer off. The second type is RAM (random access memory) . This memory holds the program you type in at the keyboard or send in via a cassette or disk . In most computers the computer ' forgets' what is in RAM when you turn the power off. Microprocessor - the heart of any computer . It requires

peripheral unit interfaces, such as a power supply and input and output devices , to act as a microcomputer . MODEM - stands for Modulator Demodulator . This i s a

device which allows two computers to talk to each

1 07


I

11111111111 :

GAMES F OR YOUR MSX

: 11111111111

other over the telephone . The computers usually use a cradle in which a telephone receiver is place d . Monitor - this has two meanings i n computer terms. One

meaning is a television-like display. A monitor has no facility for tuning television programs, and usually the picture produced on a monitor is superior to that produced by an ordinary television . The second meaning of a monitor relates to ROM . The monitor of a computer is described as the information it has built in when you buy it . This information allows it to make decisions and carry out arithmetic computations . a framework to which extra circuits can be added . These extra circuits often give the computer facilities which are not built-in , such as that of producing sound or of controlling a light pen.

Motherboard

-

MPU - an abbreviation for Microprocessor Unit .

N Nano-second - a nano-second is one thousand billionth

of a second , the unit of speed in which a computer or a memory chip is often rated. Non-Volatile Memory - memory which is not lost when

the computer is turned off. Some of the smaller computers such as the TRS-80 Pocket Computer have non-volatile memory . The batteries hold the program you enter for several hundred hours . Not - a Boolean logic operation that changes a binary

digit into its opposite . Null String - a string which contains no characters. It is

shown in the program as two double quote marks , without anything between them. Numeric - pertaining to numbers as opposed to letters

(that is, alphabetic) . Many keyboards are described as being alphanumeric which means both numbers and letters are provided . 1 08


I

1 11 1 1 1 1 1 1 1 1 1 :

GLOSSARY

: 11 1 1 1 11 1 1 1 1 1 1

0 Octal - a numbering system which uses eight as the

base , and the digits 0, l , 2, 3, 4, 5, 6 and 7. The Octal s yste m is not used v e ry m u c h nowadays i n microcomputer fields. The Hexadecimal system is more common (see Hexadecimal) . Operating System - the software or firm ware generally

provided with the machine that allows you to run other programs . OR - an arithmetic operation that returns a l , if one or

more inputs are l . a method of sending text messages with a broadcast television signal . A teletext set is required to d e c o d e t h e m e s s a g e s . O r a c l e is r un b y Independent Television Service i n the U K , and a similar service - Ceefax - is provided by the BBC .

Oracle

-

information or data fed out by the computer to such devices as a TV-like screen , a printer or a cassette tape . The output usually consists of the information which the computer has produced as a result of running a program .

Output

-

Overflow - a number too large or too small for the

computer to handle.

p Pad - see Keypad . Page - often used to refer to the amount of information

needed to fill one TV screen, so you can talk about seeing a page of a program , the amount of the listing that will appear on the screen at one time . PASCAL - a high level language .

anything which is hooked onto a computer , for control by the computer, such as a disk unit , a printer or a voice synthesise r.

Peripheral

-

1 09


I

11111111111 :

GAMES FOR YOUR

MSX

: 11111111111

Port - a socket through which information can be fed out

of or in to a computer. Prestel - the British telecom name for a system of calling

up pages of information from a central computer via the telephone and displaying them on a television screen . A similar commercial version in the United States is known as The Source . - in computer terms program has two meanings. One is the list of instructions that you feed into a computer , and the second is used as a verb , as in ' to program a computer' .

Program

PROM - stands for Programmable Read Only Memory .

This is a device which can be programmed , and once it is then the program is permanent (also see E PROM and ROM) .

R Random Access Memory (RAM) - the memory within a

computer which can be changed at will by the person using the computer . The contents of RAM are usually lost when a computer is turned off. RAM is the memory device that stores the program that you type in and also stores the results of calculations in progress . Read-Only Memory (ROM) - in contrast to RAM , inform足

ation in ROM cannot be changed by the user of the computer , and the information is not lost when the computer is turned off. The data in ROM is put there by the manufacturers and tells the computer how to make d e c i s i o n s a n d h o w to c a rry o ut a r i t h m e t i c computations. The size o f R O M and R A M i s given i n the unit K (see K) . Recursion - the continuous repetition of a part of the

program . Register - a specific place in the memory where one or

more computer words are stored during operations.

1 10


I

1 1 11 1 1 11 1 1 1 1 :

GLOSSARY

: 1111111111111

a word that you cannot use for a variable in a program because the computer will read it as something else . An example is the word TO . Because TO has a specific computer meaning, most computers will reject it as a name for a variable . The same goes for words like FOR, G OTO and STOP.

Reserved Word

-

Routine - this word can be used as a synonym for

program , or can refer to a specific section within a program (also see Subroutine) .

s Second Generation - this has two meanings. The first

applies to computers using transistors, as opposed to first generation computers which used valve s . Second generation can also mean the second copy of a particular program ; subsequent generations are degraded by more and more noise . Semiconductor - a material that is usually an electrical

insulator but under specific conditions can become a conductor . Serial - information which is stored or sent in a

sequence , one bit at a time . Signal - an electrical pulse which is a conveyor of dat a. Silicon Valley - t h e popular name given to an area in

California where many semiconductor manufacturers are located . SNOBOL - a high level language .

the program which is entered into the computer by a user which tells the computer what to do .

Software

路-

this refers to two different computers which can accept programs written for the other.

Software Compatible

-

a non-volatile memory device which retains information so long as the power is turned on ,

Static Memory

-

lll


I

11111111111:

X GAMES FOR YOUR MS

: 11 11 1 1 1 1 1 11

but does not require additional boosts of power to keep the memory in place. Subroutine - part of a program which is often accessed

many times during the execution of the main program . A subroutine ends with an instruction to go back to the line after the one which sent it to the subroutine .

T Teletext - information transmitted in the top section of a

broadcast television picture . It requires a special set to decode it to fill the screen with text information . The BBC service is known as Ceefax , the ITV service as Oracl e . Teletext messages can also be transmitted by cable , for example the Prestel service in Britain or The Source in the United States. a device like a typewriter which can send information and also receive and print it .

Teletype

-

Terminal - a unit independent of the central processing

unit . It generally consists of a keyboard and a cathode ray display . Time Sharing - a process by which a number of users

may have access to a large computer which switches rapidly from one user to another in sequence , so each user is under the impression that he or she is the sole user of the computer at that time . Truth Table - a mathematical table which lists all the

possible results of a Boolean logic operation , showing the results you get from various combinations of inputs.

u UHF

-

Ultra H igh Frequency (300-3000 megaHertz) .

Ultra Violet Erasing - Ultra violet light must be used to

erase E PROMs (see EPROM) .

1 12


I

1 11 1 1 1 1 1 1 11 1 :

_ GLOSSARY

: 1 1 1 1 1 1 1 1 11 1 1 1

V Variable - a letter or combination of letters and symbols

which the computer can assign to a value or a word during the run of a program . VDU - an abbreviation for Visual Display Unit . Volatile - refers to memory which ' forgets' its contents

when the power is turned off.

w Word - a group of characters, or a series of binary

digits, which represent a unit of information and occupy a single storage location . The computer processes a word as a single instruction . Word-Processor - a highly intelligent typewriter which

allows the typist to manipulate text , to move it around , to justify margins and to shift whole paragraphs if nece ssary on a screen befo re outputting the information onto a printer. Word-processors usually have memories , so that standard letters and the text of letters, written earlier , can be stored.

1 13



1 11 1 1 1 1 1 11 11 1 :

BIBLIOGRAPHY

: 11 11 1 11 11 1 1 1 1

BIBLIOGRAPHY By Series Editor, Tim Hartnell U sborne have released a number of very attractive books in their Usborne Computer Books series. Drawing on their vast experience in the field of producing low足 priced, highly-coloured, attractive books for young readers , they ' ve produced some books which will enlighten both young and not-so-young readers . I ' ll look at three of their titles, three which cover just about the whole field of computer interests : Information Revolution

(Lynn Myring and Ian Graham, Rigby) . Presenting an eminently readable introduction to the ' revolution ' which covers such fields as computers (of course) , text information services via the television screen , word processing , ' future phones ' and satellite communications , Informa tion Revolution is an ideal guide for the person who wants an easy-to-read introduc足 tion to the field . Computer Jargon

(Corinne Stockley and Lisa Watts) . The tone of this book is set by the frontispiece , which has a number of odd little coloured robots sitting around a table laden with computer junk , pointing at each piece saying ' ' This is a disk drive ' ' , ' ' This is a digital tracer ' ' ( ! ) a n d ' ' This is a printer ' ' . Robotics - What Robots Can Do and How They Work

(Tony Potter and Ivor Guild) . This is definitely a candidate for the award of ' the longest

1 15


I

l l l ll l l l l l l :

X GAMES FOR YOUR MS

:lllllllllll

title of the year ' . But it is very accurate . Don't be put off by the pretty pictures, as you' ll soon discover this book has a lot of solid information . Topics covered include ' ' What robots can and cannot do " , " How arm robots work " , " How to teach a robot" and " Build your own micro-robot " ; this last section actually includes nine pages of circuit diagrams and all to build a little two­ motor robot which, following a program typed into your micro , will run about the floor. Robotics is a field of the near future (with personal robots certain to be a bigger craze - when 'real robots' finally arrive - than com­ puters will ever be) . Practise Your BASIC

(Gaby Waters and Nick Cutler) . You ' ll find this book - which predictably contains a number of exercises, puzzles and problems to solve by writing programs - should be useful in giving you a number of ' core problems ' which will run on your com­ puter and which can then be modified to take advantage of your system ' s special features. Program listings in­ clude ' Pattern Puzzles' , 'Jumping Man ' , ' Horse Race ' , ' Word Editor' and ' Treasure Hunt ' , a mini-Adventure . Help With Computer Literacy

Qune St Clair Atkinson , Houghton Mifflin) . This is a large format book with an attractive cover , fairly priced for its 1 2 2 pages. It appears to be aimed at the ear­ ly to middle years of secondary educatio n , but contains a lot of material which those teaching younger children could easily adapt . Although it avoids the ' Gee Whiz ' ap­ proach of the U sborne texts , it uses cartoons and diagrams to get its message across in an inviting manner. The Interface Computer Encyclopedia

(Ken Ozanne , Interface Publications) . Compiled by a lecturer in mathematics at the NSW In­ stitute of Technology , this work could perhaps be more accurately called ' The Computer Book of Lists ' , rather

1 16


I

1 1 1 1 1 1 11 1 1 1 1 :

BmLIOGRAPHY

:111111111111'

than an encyclopedia . It contains annotated references to ' all ' microprocessors , ' all ' microcomputers , and ' most ' microcomputing magazines . The inverted com­ mas are there because - as the author admits candidly in his introduction - any such work is likely to be out of date even before it is published . Fat ( 445 pages) with minimalist presentation (the whole book is dumped directly from a word processor onto a dot-matrix printer) you ' ll find this a useful work if you want a ready reference to chips, computers and the ever-growing field of specialist magazines . Computer Resource Book - Algebra

(Thomas Dwyer and Margot Critchfield , Houghton Mifflin) . Dwyer and Critchfield have clocked up an enviable str­ ing of successful computer books, and this one , part of a series, shows why . With simple , but valuable programs, the authors lead the reader (who can be a secondary stu­ dent , or an instructor) through most of the phrases of the BASIC programming language which are common to all low-priced computers , and most educational time­ sharing systems. Apple 11 BASIC

(David Goodfellow , Tab Books Inc . ) . Attractively packaged , this book i s clearly laid out , with an abundance of example programs ; it takes a commen­ dable approach to the business of teaching programm­ ing , with the qualities of ' programming style ' introduced without fanfare . In the crowded field of ' how to program your Apple ' books, this one stands out . Much of the material presented is applicable to any microcomputer . Pre-Computer Activities

(Dorothy Diamond , Hulton Educational) . This practical guide for teachers and parents can help make children familiar with essential computer pro­ cesses and language before they have hands-on ex-

1 17


I

1 1 1 1 1 1 1 ttfL

GAMES FOR YOUR

MSX

: 1 1 11 11 1 1 1 1 1

perience . The book contains a number of interesting ac­ tivities , including investigating binary numbers using little lights , and working with cardboard ' c alculators ' before getting to the real thing. The discussion on corn. puter graphics is enlivened by reference to the solid blocks which make up a ' Pacman ' figure . Word Processing Experience

Qanet Pigott and Roger Atkins-Green , Stanley Thornes Publishers Ltd . ) . Designed for schools , but ideal for adapting i f you ' d like to increase your skill with a word processor (or simply because you ' d like to see what word processors can do so you can write one for your own microcomputer) , this book looks at the mechanics of word-processing, while passing on a great deal of useful information about word­ processing techniques . A n Introduction to Micro-electronics and Micro­ processor Systems

(G H Curtis and P G Wilks , Stanley Thornes Publishers Ltd . ) . This work was written for j unior college students and older school pupils, as well as for non-specialists who wante d a comprehensive - if dry - technical introduc­ tion to the subject . The going is not easy , but it ' s worth the effort . Topics covered include ' Logic ' , ' Programming the Microcomputer ' and ' Analogue , Binary and Digital Systems ' . Computer Images - State of the Art

Qoseph Deken , Tliames and Hudson) . This is a beautiful book, large and glossy , and packed with quality full-colour computer-generated (or, in some cases , computer-modified) images. The whole fas­ cinating field of modern computer graphics is discussed - from television programme introductions using photo­ graphs which are colour-modified , twisted and tweeke d , t o the use o f incredible high-resolution images in

1 18


I

l l ll l l l ll l l l :

BIBLIOGRAPHY

: l l l l l l l l l ll l '

simulators for flight training and tank manoeuvring. You ' ll read (and see) how computers are used to pro­ duce images, how these are used for education and com­ munication , why ' art for art ' s sake' is a goal worth pursu­ ing, and how computer images can evolve using pro­ cesses uncannily akin to the processes by which groups of cells multiply and divid e . If you want to see what can be done with high resolution graphics and when time , money and skill abound , you should get this book . Computer Bluff

(Stephen Castell , Quartermaine House Ltd . ) . A much more valuable book than its title indicates , it con­ tains a lot of information on the what and how of com­ puters , along with a generous dollop of computer j argon (or ' How to Cheat in Computer-Speak ' ) . The style is gen­ tle and amusing , with no appalling puns or excessive asides (such as ' didj a get that j oke, buster? ' ) . A pleasant , painless book which you can digest , then give to a parent. Penguin Books has moved into the computer field with enthusiasm . As well as a ' Getting the Most Out of Your . . . ' series , they have a number of games books . Two which stand out are The Penguin Book of VIC 20 Games (Paul Copeland) and The Penguin Book of Commodore 64 Games (Robert Young and Paul Copeland) . Priced at £4 . 95 each , these large format books include such pro­ grams as ' Space Venture ' , ' Oil Rig ' and ' Red Alert ' . Worth buying, even if you do not have a VIC or a Com­ modore 64 , simply as a source of ideas for new programs to create on your own microcomputer . Arcade Games for Your VIC 20 and Arcade Games for

Commodore 64 (Brett Hale , Corgi/ Addison­ Wesley) by contrast , are definitely only for those who have the machine specified . The programs are locked ir­ revocably to the computer named. Taking advantage of a number of machine-specific features (such as sprite

Your

1 19


I

11111111111 :

X GAMES F OR YOUR MS

: 111111111111

graphics on the 64) , Brett has produced a selection of around 20 programs for each machine . Each one is listed twice, the first time for the j oystick and the second time for the keyboard . Titles include ' Galaxy Robbers ' , ' Bullet Heads' and ' Y ackman ' . CREATING ADVENTURE PROGRAMS

There are a number of books, some of which are aimed at computer owners , which will help you if you are one of the many , many computer games players who are in足 terested in developing ' Adventure ' and ' Dungeons ' type programs. The place to start is with TRS Hobbies' Dungeons and Dragons (TM) Basic Set , which comes with the introductory rule book, Dungeon Dice (tm) and an instruction module , along with a sample scenario ' The Keep on the Borderlands ' . If you ' re new to the field, you should start with this set to give you an idea how ' real life ' Adventure programs are built up . Additional information is provided by Fantasy Role足 Playing Games 0 . Eric Holmes , Hippocrene Books Inc . )

which looks a t the whole field and , despite some dis足 paraging things to say on computer versions of such games, is worth looking for . Another overview of the field - with more sympathetic comments on the use of com足 puters - is provided by Dicing With Dragons - An Introduction to Role-Playing Games (Ian Livingstone , Routledge and Kegan Paul) , which includes a full ' solo Adventure ' , a review of the major games on the market , and a fascinating chapter on the pleasures and perils of being Dungeon Master in ' Playing God ' . Wargaming (compiled Bruce Galloway , published Patrick Stephens) provides a complete unified system for ' historically accurate ' (or at least in tune with the beliefs and circumstances of individuals in the peasant , feudal-economy times in which many Adventures are set) games . The fight , weapon and

Fantasy

1 20


'1 1 1 1 1 1 1 1 1 1 1 1 :

BIBLIOGRAPHY

:1111111111 11'

monster tables alone are worth the book, as many of their ideas can easily be incorporated into your Adventures . There are two computer Adventure books which you could get to help you in the fascinating area of producing Adventure games on your machine . Creating Adventure Programs on Your Computer

(Andrew Nelson, Interface Publications) . Written by the author of More Gam es for Yo ur VIC 20 and Games for Yo ur Tl 99/4A , in the Virgin Books games series , this book takes you through the task of developing an Adventure program of your own , concentrating more on the ' Loot and Pillage ' school of gaming than the Scott Adams ' ' solve this puzzle to advanc e ' field . Three com足 plete Adventure programs are included . Write

Your

Own

Adventure

Programs

for Your

Qenny Tyler and Les Howarth, Usborne) is a much quicker introduction to the field than Nelson ' s , but nevertheless packs a lot of valuable infor足 mation into its 48 pages. Step-by-step instructions are provided for creating an Adventure from scratch. A complete program - ' Haunted House ' - is included in the book .

Microcomputer

The Age of Computers is the general title of four fine

books produced by Wayland Publisher Limited. Each priced at 贈4 . 9 5 , the books present a careful , but inviting, view of four aspects of the computer field , one on the history of computers and the others looking at specific areas of modern computer application . Each book is by Ian Litterick and Chris Smithers. The four titles are The Story of Computers, with Charles Babbage and Uncle Sir Clive Sinclair j ust inside the cover (and these two pic足 tures accurately sum up the historical period covered by the book) ; How Computers Work (with chapter headings including ' Bits, Bytes and Binary' , ' Decision-making by Transistor ' , and ' Talking With Computers ' ) ; Computers in Everyday Life (such things as ' Robots in the Home ' , ' Magnetic Money' and ' Medicine and the Disabled ' ) ;

121


I

11111111111:

GAMES FOR YOUR MSX

: 1 1 11 1 1 1 1 1 1 1

and Computers and You ( ' Computopia ' , ' Big Brother ' , ' War and Peace ' and - a fascinating final chapter ' Will Computers Need Us? ' ) . Inside BASIC Games

(Richard Mateosian , Sybex) . This book is a slightly overwritten guide to under足 standing computer games . You ' ll learn how to write interactive programs in BASIC and how the principles of system development are applied to small computers . The book also looks at how the features of specific small computer systems have been supported in BASI C . If you can contend with the verbiage , you ' ll find this book well worthwhile . 1001 Things to Do With Your Personal Computer (Mark Sawush , Tab Books) . Big and fat , and full of ideas , you ' ll find much here of in足 terest to enlarge your computer horizons . The book tells you about writing music and stories with your computer, aiding a mechanic or a carpenter , solving simultaneous equations , astrology and much , much more . Stimulating Simulation&

(C . W . Engel . Hayden Book Company) . Here are 1 2 unique programs written in a good, general version of BASIC. The fascinating programs include ' Forest Fire ' , ' Rare Birds ' and ' The Devil ' s Dungeon ' . You ' re sure to enj oy playing those thre e , along with ' Dia足 mond Thief' , in which the computer decides who has committed the crime , then challenges you to discover which of the suspects is guilty . The material in this book is generally tightly programmed , and can be a helpful source of ideas to improve your own computer work . The BASIC Handbook

(David A . Lien, Compusoft Publishing) . This is an encyclopedia of the BASIC language . It comes into its own when you find a program in a magazine or

1 22


BmLIOGRAPHY

: 1 1 1 1 11 11 1 1 11 '

book which you ' d love to try , but are frustrated because it is written for another version of BASI C . Every BASIC word you ' ve ever heard of (and many you may not have , such as NE , GOTO-OF and LE) is in here , along with a number of variations, one of which will almost certainly be on your machine . BASIC Computer Games

(David Ahl , Creative Computing Press) . This is a classic work, still selling well despite the fact it was one of the first such books - if not the first - on the market . David Ahl has been in personal computers even before there were such things . Although several of the games are overly-dependent on the random number generator , you ' ll find there are many , many games you ' ll want to adapt and improve for your own computer. How to Buy (and Survive) Your First Computer

(Carolee Nance Kolve , McGraw-Hill Book Company) . When is a business ready for a computer? How do you make an intelligent , informed choice among the hun足 dreds of computers available? Will a computer improve a company ' s operations? Answers to tnese and a score of similar questions are in this book, which explains in detail what to consider before buying, how to select the right computer , and what to do after ordering the computer to ensure a successful installation . Ms Kolve has over 1 5 years computer experience (including a stint with IBM) and brings her experience to bear in a relatively easily足 digestible guide . Your First BASIC Program

(Rodnay Zaks , Sybex) . This book , liberally illustrated with large red dinosaurs in a variety of situations vaguely related to the text (one , for instance , as a cowboy getting tangled up in his ropes with the caption ' Be careful when looping ' ) , is a gentle and worthwhile introduction to the not-so-secret secrets of programming in BASIC . When you want to move

1 23


1

11111111111:

X GAMES FOR YOUR MS

: l l l l ll ll ll l r

beyond j ust typing in other people ' s programs from books and magazines , this may be a good place to start . This bibliography was compiled by the series editor, Tim Hartnell , who has felt constrained not to recommend any of his own books. However , he asked us to mention two which could be of use and interest to you . The first is The Personal Computer Guide (Virgin Books) which explains what a personal computer is, and answers questions like ' ' Will it help my kids? ' ' , ' ' What sort of games can we play on it? ' ' and ' ' What can I use it for in the home? ' ' . The book describes many of the most popular computers available today , with illustrations, technical specifications and other information to help you to choose the equipment best suited to your require­ ments . Also included is an introduction to BASI C pro­ gramming, with details of programs suitable for use in the home , a list of suppliers and user clubs , and a guide to further reading. There are also chapters covering the personal computer ' s history and its future . When you ' re ready to upgrade , you ' ll find this book a good, unbiased , reference work which looks a t the choices facing you . Tim Hartnell' s Giant Book of Computer Games.

Described by Personal Comp u ter News as ' a good source of ideas ' , this 386-page book , published by Fon­ tana , for £3 . 95 , contains over 40 programs which will run with minimum modifications on most popular microcom­ puters . The games include chess (of a sort ! ) , a l 7K Adventure and ' Hyperwar ' .

1 24








Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.