TS)

FUTURE FORM As we conclude the present series on education, we turn our attention to the future

SIX-PACK ROBOT The Fischertechnik Robotics kit allows you to build up your own | 189 systems and connect them to your micro.

We examine its potential

DOUBLE-ENTRY DATABASE Th : power of a good database manager is clearly | 186 seen when information from one file needs

relating to data from another. We provide

specific examples |

BAD MOON RISING Ultimate’s follow-up

to Sabre Wulf has a hero (Sabre Man) 1? turning into a werewolf. The game displays

some of the best Spectrum graphics yet seen

4

COMPUTER SCIENCE

VALUABLE VARIABLES We look at PASCAL’ use of functions and some sample programs illustrating the language’s concise

structure

FROM OPTICAL DISC TO ORDERED PAIR A weekly glossary of computing terms | 188

PLAGUED WITH PROBLEMS Six possible major events can affect your voyage. | 192 This week’s module deals with a stranded

crew and a visitation by the plague

SIGHT EFFECTS We look at the VIC-II video controller chip for the Commodore 64 e) and see how its registers create different

display modes and visual effects

ELBOW GREASE We continue the programming of the robot arm by providing | 195 the software for the Commodore 64

7 BACK INDEX A complete index to issues 49 to 60 COVERS

1) Why is it necessary to blank out the screen when we run the robot arm from the Commodore 64?

2) Why is the Prof command system inappropriate for driving the Fischertechnik graphics input device?

3) What is a CD-ROM?

4) What is the storage capacity of an optical disk?

COVER PHOTOGRAPHY BY CHRIS STEVENS

may change educational methods. ~

Sa ane enter

Imminent developments in hardware and a

revolution in data storage techniques look

set to make the traditional classroom

and pupil. We conclude our ihrdsent series. on education with a conjectural assessment. of the way in which computer keqhnology

The future of educational computing presents a.

sharp contrast. to. its.past. (Cheaper. hardware, improved .. software and

of education as we know it. Far from being the

poor relation of the consumer market, education.

| technological development are all combining to change the face

growth areas in the development. of anew

technology. The reason for this sudden reversal in

the image of educational computing is not hard to pinpoint... revolution, education was consistently overlooked _.by hardware and software companies in favour of the more lucrative consumer. market. This situation is changing rapidly as producers. realise the. importance. of. selling into schools..and .. promoting brand awareness among children who will later be consumers.in their.own right.

_ The immediate. effect. of this is cheaper and more readily available hardware. In 1985 Apple.

began a campaign. selling the Macintosh into schools. at a 30 per cent. discount. Atari. has followed Apple by designing its new range of ST

In. the early days of the technology

is. rapidly. establishing. itself. as one of the major 32-bit micros with the education market in mind,

Hub Of Learning- Computers.may.revolutionise our ideas of education by placing the child at the centre of the learning process, in control of the different teaching ~ -resources.that new-technology will make available. Satellite technology and networking systems will enable the student ‘to communicate with knowledge databases from different countries.and.cultures.around the world. Schools may give way to ‘learning supervision centres, where children meet to discuss their work, most of which could be completed-at home: Interactive video systems.can form a basis for the development of highly complex software and robots may be used in physical demonstrations of.-abstract-concepts... Additionally, local mainframe systems may be accessed by the student, using a micro as an intelligent terminal, and such systems could supervise exchange .of data,.pupil-to-pupil.... communication, and offer increased processing power when necessary

ALAN ADLER

‘THE HOME COMPUTER ADVANCED COURSE 1181,

Ec | x = te

structure to one centred around the individual student are enormous and by no means confined to the process of learning. Professor Stonier has co-authored a book entitled Children, Computers and Communications in which he predicts education by the ‘electronic grandmother’ system.

According to Stonier, as education shifts from school to home and improvements in healthcare and medicine increase the average lifespan, senior citizens will become more involved in education, as indeed they already are in many so-called

V) technology. These . shots from ‘The Teddy Bear.Dise’ show a computer- controlled video disc system in action, in this case as a tutorial for undergraduates in engineering materials. The program Is set in an industrial court and IV technology enables the student to play the part of the ‘expert witness, carrying out experiments and using the system to construct a legal case

VALUABLE VARIABLES

sgnumnnannna soanasentnnsennnnnaaaes

in our previous instalment,

scghannansunmiaenismnenenantanenennars a

Seer

A e sa

PASCAL allows no such thing as a function statement functions compute values rather than invoke procedures for them. Here, we look at the use of functions within parameters and provide several examples that illustrate pAscAL’s strict, and therefore

expressions not as statements. Whereas procedure calls invoke the execution of subprograms to perform some process, function calls compute a value. The result returned may be of any simple type, real or scalar, or a ‘pointer’ type (which we have yet to deal with). The only difference in the heading, besides using the reserved word FUNCTION, is that the type identifier of the returned result must be specified. Suppose that PASCAL did not have the predefined function odd we could easily define our own:

FUNCTION Odd (number : integer) : boolean;

BEGIN Odd := number MOD 2>0 END; {Odd}

The value is returned in the function identifier, and

therefore must be assigned to it in the body of the function, as shown. In this respect, function names are like variables which are never initialised, but their values are computed whenever they appear in an expression. They can only appear on the LHS (left-hand side) of an assignment, so if we were careless (and long-winded) and programmed the assignment as:

IF number MOD 2 > 0 THEN Odd :=true

(forgetting the necessary clause ELSE Odd :=false), a path through the construct exists leaving the result undefined.

As with the procedure parameters we have considered so far, the value of the actual parameter is passed to the local integer identifier, number, from the ‘activation’ point. So:

WriteLn ( Odd ( sqr ( N DIV 100) ) )

which would always print False, performs four

operations :

1. the expression N DIV 100 is calculated

2. this temporary integer value is passed to sqr as an actual value parameter

3. its square is returned and passed to Odd

4. the Boolean result is now evaluated and passed

1184 THE HOME COMPUTER ADVANCED COURSE

to the WriteLn procedure as another value

parameter If N had the value 17 when the statement above was executed, what would its value be afterwards? This may seem like a ridiculous question, of course. There is no possible reason for N’s value to be changed during evaluation of any function involving N as a parameter. The results of all

functions should merely depend on the ‘state of |

the world’ as it exists. That is, the returned value is a ‘function’ (sic) of the value(s) of their ‘arguments’ or parameters. PascAL’s mechanism for passing only the value of variables ensures that even if the parameters are changed locally by a function or procedure, and because they are in fact local copies, the actual parameters will not be altered at the activation point.

GLOBAL DATA VS PARAMETERS For these same reasons, although PASCAL does not forbid it, data should not be accessed globally. All data linkage between procedure and function calls should be controlled by parameter lists even though the data is within the subprogram’s scope. The only exception to this general rule is for the access of global constants. Because of their very nature, no harm can befall them in PASCAL, as it is impossible to alter their values. If a constant value were passed as a parameter, however, it would become a local variable and therefore no longer secure.

FUNCTION Lower (character :char) ‘char; {returns the lower case of any upper case argument }

CONST

_ Offset = 32; { ASCII ord (‘a’) ord ('A’)}

BEGIN

IF character IN [ ‘A’. . ‘Z’ | THEN

Lower := chr ( ord (character ) + offset ) ELSE Lower := character END; { Lower }

When we are defining procedures, it is sometimes essential that they should alter the values of their parameters otherwise they would not perform the task for which they were designed. An obvious example is PASCAL’s own read procedure. It would not be very helpful if read (N) merely gave a value to an integer that was local to read and the value of N were unchanged. In such cases, we need to pass the address of a variable parameter (rather than its value) in order that the procedure may refer directly to it rather than a local copy. This mechanism is called ‘passing by address’ or “by reference’, and should normally be used only with procedures, not functions.

Passing of variable parameters is achieved simply by including the reserved word VAR before any item (or items) in the procedure’s parameter list. The syntax of a parameter list can be seen to be identical to the VAR declaration of a block; but instead of VAR appearing once as a delimiter, it

Se - : Va ~

only appears before an item that needs to be VARied by a procedure. For instance:

PROCEDURE Process ( VAR counter : CountList ):

APPLICATION DEVELOPMENT

Let’s illustrate this powerful technique by developing a program to read some names from the keyboard and, associated with each name, an amount of money that each person owes us. For simplicity, we'll just use one string per name and express the debts as integer amounts in pounds sterling. Once the program is tested, we could add further details such as addresses, telephone numbers and so on. We would like to print out the list of names either in ascending alphabetical order or possibly in order of largest amounts owing. The

natural data structure will be a list of records containing fields of the appropriate type that can

easily be added to later. We can handle each record as a single piece of data, but use any of the fields we choose as a ‘key’ for sorting. (For more information on ‘keys’ see page 1124.) First, let’s design the full data representation:

CONST StringLength = 20; ListLength =50; TYPE Cardinal =0.. Maxint; StringSize =1. . StringLength; string = PACKED ARRAY [ StringSize |

OF char;

data = RECORD name: string; {other fields to suit} debt: Cardinal; END; {data} bounds =1.. ListLength; RecordList =ARRAY [ bounds ] OF data;

This allows for fifty names and assumes (for now) that no name will exceed twenty characters, but by using definitions we can easily alter this.

We have expressed all the subranges and structures in a TYPE definition part for several reasons:

1. security an index of type bounds can never exceed the defined limits of the array, for example

2. tracing bugs should such a ‘range error’ occur during testing, the error message will help locate the trouble |

3. convenience and efficiency local variables can have existing types, avoiding duplication and saving memory

4. necessity PASCAL insists that parameter type ‘denoters’ must be identifiers, not ‘literals’ (0 .. 255, for example)

Next, we have to think about a few essential variables and an algorithm, all of which will be discussed in the next part of the series. In the meantime, try to develop your own ‘informal algorithm’ for the program and make a list of any procedures that you feel may be necessary.

THE HOME COMPUTER ADVANCED COURSE 1185

DOUBLE-ENTRY

DATABASE

It is important to recognise ~ when considering DBMs that certain types of files require different approaches to the

organising, cross-referencing and retrieval of data. We present a number of examples illustrating these different approaches, from the straightforward ‘flat? database to the complex and powerful dBase II.

Any record held in a ‘flat’ database will be completely self-contained; that is, any given record will hold all the information required, without the need to refer to another record. Traditional card-box files are flat in this sense. We can think of a library database, for example: each record consists simply of the fields TITLE, AUTHOR, PUBLISHER and ISBN (International Standard Book Number), and no cross-referencing is required.

Sometimes a field will contain an entry that can have a record in its own right. In a club membership file, for example, a CHILDREN field

can refer to other records in the same file; if the children of a member are also club members they will have records of their own. But a field can refer to records that might not fit into the general structure of the database file. Consider a parts inventory database, containing the fields PART NUMBER, PRICE, NUMBER IN STOCK and SUPPLIER. It’s highly likely in this case that the SUPPLIER field will also refer to other records that do not fit into the structure defined for the PARTS database.

To illustrate this, here, first of all, is the CLUB

MEMBERSHIP file:

MEMBER’S NAME Sue Gomez

YEAR JOINED 1979

SUBSCRIPTION? Paid

OCCUPATION Teacher

SALARY 8900

CHILDREN Jill Gomez, Philip Gomez

In this example, the field CHILDREN contains two entries; both of these could have similar entries in the CLUB MEMBERSHIP file, if they were also members. Compare this with a PARTS database record:

PART NUMBER 3995

NUMBERIN STOCK 86

PRICE 34.75

DESCRIPTION Dongle with widget nozzle SUPPLIER Widgerama Ltd; Dongle Corp

of Taiwan

There are two entries in the SUPPLIER field; neither of these could have records that could fit into the

1186 THE HOME COMPUTER ADVANCED COURSE

structure of the PARTS database. So, a parts inventory such as this would probably have a second database file for suppliers, in which each entry might look something like this:

SUPPLIER Dongle Corp of Taiwan

ADDRESS 57 Kau Moo Road, Taipei, Taiwan, R.0.C.

TELEPHONE 010-886-2-223-4478

SUPPLIES1 Dongle with widget nozzle

PRICE1 (SUS) 34.75

SUPPLIES2 Valve paste (2 litre can)

PRICE2(SUS) 6.00

SUPPLIES3 Dazzlebrite polish (small can)

PRICE3(SUS) 2.30

SUPPLIES4 Dazzlebrite polish (large can)

PRICE4(SUS) 4.00

SUPPLIES5

It is perfectly obvious that the information we need about each of the suppliers is quite different in structure from the information we need about the parts the company sells. The solution is to have two different database files one for the parts themselves, and another, separate file, for each of the suppliers.

If separate but related files are to be usefully implemented, it is obviously necessary for the DBM to be able to handle more than one file at a time. Less sophisticated DBMs, such as Card Box (see page 1104), can work only on a single file at a time, but DBMs such as dBase II (see page 1152) can use one file (such as PARTS) as a primary file and another (such as SUPPLIERS) as a secondary file. A really good DBM will allow a sort to be run on a primary file (to extract selected records) as

well as the extraction of relevant records (such as SUPPLIERS) from related files.

The dBase II package allows two related files to be used at the same time, and associates them by using common key fields. Two commands allow reference to be switched from one to the other:

a

= ~

Using our own index card filing system, entries can be as complex (or untidy) as we wish. DBMs have to adopt a more structured approach to data

entry, but sophisticated programs will allow the user to call up related files and, when entering data, to skip certain fields if they have been made redundant by other entries in the record. Taking the illustrated record as an example, the field labelled ‘Re-order sent’ is

relevant only if the stock approaches or falls to zero.

Consequently some DBMs, such as ‘Rescue’, enable the user to

SELECT PRIMARY and SELECT SECONDARY. If the primary file is PARTS and the secondary file is SUPPLIER, and we were working on the PARTS file, we would issue the command USE PARTS. If we then wanted to cross-refer to the suppliers file we would issue the commands: SELECT SECONDARY, and then on the next line, USE SUPPLIER. All the usual dBase II commands are available for use, and they will operate on the file that was most recently selected.

There are times when the contents of a field (such as SUPPLIER in the PARTS file previously mentioned) do not require the facilities of completely dependent records (in independent files), so that dependent fields within the same record would suffice. As an example, suppose you are keeping a database on the latest automobile technology, storing records of press cuttings and references in books that you have seen, relating to things as diverse as injection-moulded plastic bodies and electronically controlled fuel injection. You might design a database format like this:

TOPIC: SYNOPSIS1: SYNOPSIS2: SYNOPSIS3: SOURCE: TITLE: DATE: PAGE* NO:

If the source of an entry is a magazine, such as Autocar or Off Road Rider, the ISBN field will be irrelevant, since magazines do not have International Standard Book Numbers. If, however, the source of the entry is a book called Programming ROM Chips for In-car Computers, there will be an ISBN. Similarly, if the source is a book or a magazine, there will be a page number. But if the source was the BBC television programme Wheelbase, the PAGE NO field would not be needed. Some DBMs, such as Rescue, by Microcomputer Business Systems, allow the

ISBN:

set up fields to be dependent on, or calculated by, previous fields.

presence or absence of any particular field within a record to be either calculated or dependent upon other, previous fields.

Thus, if the SOURCE is not a book, the ISBN field will not be prompted for entry and will not be displayed (either on the screen or in printouts). If the source is neither a book nor a magazine, the PAGE NO field will not be required and will not be displayed. A DBM able to do this can save on memory by eliminating unnecessary fields, and helps to improve the presentation of information. It is still, however, less versatile than a DBM able to relate records in one file to records in another file.

In databases where there may be some root information that remains constant for every record, and some branch information that may or may not be required, we have what is known as a ‘two-level hierarchy’. As a general rule, multi-file DBMs can treat two-level hierarchical data as a subset or special case of a multi-file database. For example, a SOURCE reference to a book could relate to a BOOKS file and a SOURCE reference to a programme could relate to a PROGRAMMES file.

There is one final thing to bear in mind. A hand- written card-index file of your own design can be as complex as you care to make it. But there will be serious limitations among the different,

commercially available DBMs as to what they can and cannot handle structurally. So before purchasing a DBM for your micro, think hard about what exactly you want it to do and look carefully at the specifications for any product you are considering.

THE HOME COMPUTER ADVANCED COURSE 1187

Likely Lasers Optical discs are now finding a wide range of applications in

computing as storage mediums. Not only are they being used in .

their more conventional role of storing TV pictures on which computer graphics can be displayed, but they are also

being used to store computer

programs which can be loaded and run. The drawback to the

technology at present is that optical discs are confined to ‘read only’ memory.

OPTICAL DISC

Perhaps better known by its commercial name, laser disc, an optical disc is a storage device on which digital data is etched onto the tracks (spiral or concentric) that can be read by photoelectric cells. The information is stored by etching gaps in the tracks that, when read back, will be interpreted as logical one. Areas that have not been etched will be read as logical zero.

Although at the moment commercial application of optical discs has consisted of providing an alternative storage medium to video cassettes, the potential applications of this technology for home computer users is immense. A standard optical disc can store over two gigabytes (two billion bytes) of information, yet the price of such a device is not much greater than that of a video cassette.

Unfortunately, the drawback with optical discs at present is that the information has to be etched on with a laser and cannot be erased. Thus, at the moment, they are suitable only for pre-purchased programs and not for back-up storage. However, when we consider that many of the newer integrated business packages already require half a megabyte of storage, the idea of buying an optical disc with perhaps only one or two applications packages on it is not so outlandish.

As with many advances in computer technology, the first applications of optical disks

were found in arcade games. Arcade players are

IAN McKINNELL

now able to ‘fly’ aircraft (computer-generated sprites) through real scenery, which has been filmed (the sprite is superimposed onto the background). The realism of the game is far superior to anything that could be achieved by means of computer-generated graphics.

1188 THE HOME COMPUTER ADVANCED COURSE

OPTIMISATION

This refers to the process by which a program is written in order to produce the best solution to a problem. But the best solution may not necessarily be the same in every case. For example, some programs may require maximum speed whereas others may need to make the best possible use of available memory space. A number of techniques have evolved to achieve the various aims of optimisation. It is not possible to give explicit examples, since the optimisation of a program will vary with the restrictions placed on it by different situations. However, it is possible to illustrate some general principles.

Optimisation generally consists of removing or streamlining program processes that are unnecessary. But good programming practice should produce the optimum result anyway. The assignment of variables is a good example. Once a variable has been assigned, unless it is altered, there is no need to reassign the same value to it. Thus, the initialisation of variables in a program should not take place within loops or commonly used subroutines.

OR

This is one of the six Boolean logical functions. The result of an OR operation is true if either of the inputs are true. The OR function is more properly known as an ‘Inclusive-OR’ to distinguish it from the Exclusive-OR (XOR) function, the latter precluding the possibility of both inputs being true and producing a true result.

ORDERED PAIR

An ordered pair is two numbers that are always given in a set order. For example, when using Cartesian geometry, we refer to the co-ordinates (x,y) always in the same order, with x representing the horizontal axis and y the vertical. The advantage of this is that when we assign a value to the first variable in an ordered pair, we can assume that everyone understands which axis we are defining. Although ordered pairs are the most commonly used, it is also possible to refer to ordered triplets or, indeed, any other grouping.

OSCILLOSCOPE

This is a device that provides a_ visual representation of a wave pattern. An oscilloscope receives an input in the form of an electrical signal and displays the wave form on a cathode-ray tube (CRT) although some of the newer oscilloscopes use LCD technology. Unlike a conventional television screen, an oscilloscope CRT does not build up the picture by the method of raster scanning the horizontal lines. ‘The electron beam is instead deflected in a vertical direction as it moves horizontally across the screen, thus creating the displacement of the amplitude as it varies with time. Oscilloscopes have a wide range ot test applications, from examining the properties of sound waves to calibrating and testing electronic timing devices.

SIX-PACK ROBOT

Currently available robotics kits, though fun to build and interesting to play with, provide no lasting stimuli for the home hobbyist. Fischertechnik has eliminated this problem by introducing a kit that allows you to build either the six designs provided or else any of your own surely a check against losing interest in these fascinating devices.

Although many people within the home computer industry have been predicting for some time that the next big growth area within the industry will be home robotics, the predictions have still yet to come true. The reasons for this are not hard to find. Despite the fact that over the last year or so numerous ‘home robots’ have appeared on the market, they have suffered from a few major problems that have prevented the public from being convinced that an introduction to robotics is an interesting and worthwhile endeavour.

On the one hand, there are the easily built robots such as the Movits (see page 1084), which can be assembled in a few hours by somebody without any knowledge of robotics or even electronics. The problem here is that these devices are strictly limited in their applications and the user will probably soon lose interest in the machines. On the other hand, more expensive robots are available that generally require extensive knowledge of robotics and electronics in order to operate them. Even then, many of these more advanced robots have only a single purpose. Once again, this means that when all the avenues have been explored, the robot is left to collect dust on the shelf.

Thus it seems obvious that what is required is a robot that can be easily constructed which has a number of different functions that can each be explored by the user. This is the claim that is made for the Fischertechnik Robotics Kit. The idea behind the kits is fairly simple. For many years now there have been a number of electronics kits, intended for children, enabling them to construct simple circuits to form, say, a basic radio. This same kit can then be taken apart and reconstructed to form a simple electronic timing device or burglar alarm. Simultaneously, generations of children have been brought up on Lego kits that can be used and reused to build an enormous number of different models from the same plastic building blocks. In designing its robotics kits, Fischertechnik has adopted both of these ideas and merged them with modern computer technology to develop a product that could well become the popular breakthrough for

robotics that so many have been predicting.

The Robotics kit allows the user to build a number of different robot devices that can be run from a home micro. These robots range from a robot arm and a machine that sorts items of varying lengths into order, to a plotter and a graphics input device. Once the user has experimented with one particular robot, it can be taken apart and rebuilt to form another. In order to run the robots from a computer, an interface is required to turn the computer’s digital signals into those which can be used to operate the kit’s electric motors. |

Consisting of a number of plastic pieces, the construction kit components can be slotted together rather like a Lego kit to form various models. These pieces take the form of blocks that can be linked together to form the longer pieces of the arms or used to hold the control units. Other pieces for building the mechanical units are

Monitoring Movement

THE HOME COMPUTER ADVANCED COURSE 1189

Shown here are the opening screen displays of the Unilab interface software. The top photograph is of the robot arm control program. In the top right-hand corner is a diagram showing the horizontal movement of the arm. The starting position of the robot is assumed to be zero. As the robot arm moves to the right (with the line moving clockwise on the screen) the

number of degrees will

increase. Similarly, when the

arm extension is moved the line within the bar and the

number of millimetres moved will change accordingly. At the bottom of the screen are the various control options that can be applied. These are controlled from the microswitches on the board or from the keyboard. Sequences of movements can be stored in the computer and recalled and replayed later on.

The same system of commands is used with the plotter robot, the only difference being that extra

commands are added to the plotter to raise and lower the pen onto the paper. As the plotter moves around the paper its movements will be

mirrored on the screen

cogged wheels and screw blocks to turn the cogs. There is also a large plastic board measuring 260 by 187mm, which is used either as a base for the robot itself or, in the event of the plotter or graphics tablet being incorporated, as the base for the paper. The electrical control and power system also need assembling from separate components. The kits include a number of male and female sockets, eight switching devices and a pair of electric motors. Also provided is about a metre o 20-way ribbon cable and a small extra piece o cable for constructing ‘patches’.

Overall, the pieces are sturdily constructed an look as though they could last for many years of service. One exception to this appears to be the potentiometers. The base plate of one of them broke on construction, and although this did not affect the running of the arm (shown in the photograph) because the baseplate could be pressed back into position, it does raise a question over their long-term reliability. Another point concerning the potentiometers is that unlike the rest of the wiring, which can be screwed into sockets, there is no method of attaching the bare wires to them other than by wrapping them around the connectors. In this case it is advisable for the hobbyist intending to make a lot of use of the kit to solder the joints permanently to prevent short circuits that could damage the potentiometers.

FITTING THE COMPONENTS

Construction of the robots is quite simple and the pieces for the most part are chunky enough for the most unskilled fingers to manage. The major problem in construction is due to the manual, which is probably the greatest weakness of the entire system. Although it does have its good points for example, the easy-to-follow circuit connections the manual relies heavily on rather low-quality photographs of the partly constructed models. Photographs of the pieces required for a particular section are displayed along with partly exploded views of the robot under construction. The trouble is that these photographs are not particularly detailed and lack any annotations, meaning that builders will often find themselves peering at a certain photograph trying to find where a particular piece is supposed to go. Furthermore, as the photos show the robot from only a single direction, you will often have to guess where a piece is fitted when its position is obscured from view.

What is perhaps worse is the fact that the photos are in black and white. This means that when you eventually get to the final part, which is fitting the circuit wiring on the robot, it is next to impossible to figure out the correct wiring procedure. This is particularly strange if you consider that the circuit depends largly on the colour coding of the ribbon cable. The minimal annotations provided with the wiring diagrams are not much help either, merely stating that, for example, wires E3 to E8 belong in a particular section.

That said, it should be pointed out that the

1190 THE HOME COMPUTER ADVANCED COURSE

_IAN McKINNELL.

The interface is connected to the BBC Micro via three separate ports the user port, the analogue port and the printer port used to control the motors and electromagnet. Because the system is designed for inexperienced users, the interface board has been constructed to guard against the possibility of incorrect wiring that could lead to voltages being applied to the computer’s interfaces which may cause damage to the computer. The manual that is provided for the interface : (written by the product’s manufacturer, Unilab) is Power To The Robot much superior to the Fischertechnik Robotics To enable the robotics kit to be controlled from the BBC Micro you manual. There is a detailed explanation on how to eras, | eke Maee ed low mms he ete then aathed Cae tlc vist user, analogue and printer ports provided with the system. There is also a bnief summary of the control addresses used to control the system, thus allowing the robots to be controlled from Basic. However, the wiring diagram appears to be at odds with the Fischertechnik circuit. Although an accompanying note concerning different ribbon cables is provided with the interface, it does not appear to clear up all the problems and once again you will be left to your wits on how to wire the circuit correctly.

THE PROF LANGUAGE 7

Provided with the interface is a cassette containing three programs to assist in the control of the robots. The first two are specialised programs that control the arm and the plotter, allowing the external devices to be controlled either from the keyboard or from the control switches on the robot itself. The third program is Prof, a generalised operating system through which you can directly command the robots. It is essentially an extension of BASIC with a few extra commands added. Many of the extra words introduced by Prof are variable names like Motor and Magnet for the control address, whereas others are introduced to assist the editing of sequences of actions to be performed by the robots.

Although Prof is fairly comprehensive and allows conditional loops and _ structured programming, it is confined mostly to output control. Thus the graphics panel, an input device, is unsupported by Prof because the language makes no provision for storing information from input devices. This necessitates your having to create your Own programs from BASIC.

Despite the problems with the documentation, the Robotics kit and interface collectively is a very worthwhile system. The robots work surprisingly well and a working model can be built from scratch in just a few hours. And, the user is not just restricted to the six designs provided. Once familiarity has developed with the system, there . are any number of projects that could be constructed. At over £100 it is certainly not a pocket-money toy, and once the bugs in the documentation have been removed, the Fischertechnik Robotics kit and interface will be an ideal introduction for anyone who is generally interested in looking into the field of robotics.

CHRIS STEVENS

THE HOME COMPUTER ADVANCED COURSE 1191

PLAGUED _WITH PROBLEMS

We have seen how the events can affect t trading voy:

fting lifeboat,

g the crew: nut vill four: “axitaL. eu to, feed, but ss dealing with am attack ¢ of the lsgue,/

\aps theextra will b / L ca ength. T The.p:

at the fet core iné /been set to1 the, ver

a first saan ther

toh arene to th :

iter than 3. If

= i ca Soeoers ele N : aareionaile flag in the jer Mt) se then ape of. selecting | ‘a second duces toS in 8; or 62:5 per cent. : ecting a third ir g a third major event Simin > Or 5 0 cent. Thus the oe res

8 a tc é ype ; ] seep seat 6638 rs 06697. The value of Xi iS wMeL “check ough the array. TS, )to. 5 ifthe crew. aceys 0, sionifving aplace inthe | ay for an Sale of 1 ine = tals sma is \

= x

GOSUB statement. This is used < way as § see. the ON X GOTO statement selected ( contingencies. If X, the randomly generated number, is one, it will send the program to the first line number in the list of subroutines following the added. When x oan 4, statement, subroutine 6530 (the sighting of a have been incorporated into the crew array and so lifeboat). If X is 2, it will go tothe second addressin _ line 6655 sets the value of T to 16, causing the the list, subroutine 6700 (the deadly disease). We program to drop out of the loop when it reaches are covering only the first two contingenciesin this _ NEXT. If there is space for less than four extra crew,

instalment but in future sections we will need to the program will drop out of the loop when the

wae

IAN McKINNNELL

1192 THE HOME COMPUTER ADVANCED COURSE

array has been checked 16 times. The extra provisioning stage..The program checks whether

members are also added to the value of variable _ the subroutine has already been used, in the same

CN,the crew count. Eachnewmemberisassigneda way as in the lifeboat contingency namely, by

random value for crew type and strength within looking at the value of the second element of the gih/.type.array 1S(,); type is selected from _ flag array M(), M(2), returning if M(2)=1.

“to. 5 strength fi e _ The program then checks whether there is a

1e extract : doctor aboard. A loop, from 1 to 16, is set up to

PA(1), the element represeniti g pag sonaey Ifmedi sine i

? very weak, it is possible at the illness will kill them off. X is set to 0 and/ ed to count the deceased. A loop from line 6755, | 6 oes through the crew stre y : j d reduces the strength ratings of the crew / / / :

/ | ses / / / / Q Meme aS | aes Y Cena ke eee 7 7 ie re ra ys i : / re v4 /

é

é

Pa 7 Pe [RRR ee ee ee é : ee

é ri ri é

tine Ses

vuarbawad ® ®,

HAO cueepye FP anee nt?

THE HOME COMPUTER ADVANCED COURSE 1193

‘-> PROGRAMMING PROJECTS /SIMULATION GAME

affected by the disease. However, the illness does not affect all the crew members. Line 6756 generates a random number which if less than 0.3 means that the strength of the crew member in the current element of the array is not affected by the disease. This gives each of the crew about a 30 per cent chance of escaping illness (you may wish to alter this factor, or possibly set it up randomly). The next line checks whether the person is already dead, and hence beyond the effects of the disease. If the crew member is alive, strength is reduced by Z units and a check is made to see whether the illness killed the crew member by reducing the

1194 THE HOME COMPUTER ADVANCED COURSE

-

strength rating below 0. Ifso, itis reset to 999 where it will be picked up in the end of week report and

the value of X, the number killed by the disease,

will be increased by 1. If there was medicine available, indicated by Y=0, line 6776 reduces the quantity by half and rounds it up to the nearest whole bottle. If none of the crew has been killed in the epidemic (X=0), then control is returned to the main program. Otherwise, the player is informed how many crew were fatally affected.

In the next module, we consider more of the major events that can occur during the voyage, including a problem with the ship’s rudder.

a eeetehceciehcalecatatae

_ EEE,

The differences in the architecture, operating system and Basic dialect between the BBC Micro and Commodore 64 mean that creating programs to control the Workshop robot arm will be different in many respects. We now look at the Commodore.

The Commodore operating system generates regular interrupts to perform housekeeping operations, such as scanning the keyboard. These interrupts occur regularly at one sixtieth of a second intervals. The Commodore machine code program intercepts the interrupt vector to perform its own routine first before passing control to the normal interrupt routine. Such a program is called a ‘wedge’ (it is dealt with in more detail on page 1139). The first section of the machine code is therefore concerned with swapping the normal IRQ vector with the vector for our routine.

Once our vector has replaced the normal IRQ vector, our event handler will be implemented each time an IRQ interrupt occurs. (The event handling code itself is largely the same as the multiple-servo control program given on page 923). Essentially, this code sends pulses of current down the data lines

7 TT 7 prnanennimienncin 7 * a a :

i _ Eee a ‘i ne 4 if i

A 4

aS LL oe Ee @ 8 . s a _ _ _ "2 ce a o

ie _ : Bh i Os a _ a :

oe Be | asian ae ee iii pb i

eave

ae oe Ei

a

fe

_ _ L ; eee

cone Cees ae eR - . ie << oe oo ee a

te Es i

, A. CoO i

.

i ak FaGaee gu

from the user port to the motors. The duration of each pulse informs the corresponding motor what angle to adopt. The machine code routine receives the information that determines the length of the motor pulses from an eight-byte table, called ANGLE. As with the BBC Micro version, an extra piece of code is used to load the ANGLE locations smoothly from a second table, NEWPOS, which is the table that is loaded from the BAsic controlling program.

he arm sequence programmer uses the machine code program just described to drive the robot arm. Similar to the BBC Micro version, this program allows you to control the arm from the keyboard, saving key positions that can be replayed or stored on disk or tape. There are, however, one or two important differences between this and the BBC Micro version. First, when controlling the robot arm, the motors have a tendency to oscillate through a given position. This is because the Commodore’s VIC-II video chip interferes with the regular generation of interrupts. The simplest way to avoid this problem is to blank out the screen when using the wedge program. The subroutines at lines 7000 and 8000 clear the screen before entering the wedge and restore it when the wedge is exited.

The second problem is that Commodore Basic makes checking a large number of keys (and branching accordingly) a slow process. The final machine code subroutine is therefore used to check the ASCII code of a keypress against a table of possible keys that have a function in the table. When a match is found in the table, it is passed as a number that can be used by BAsic’s ON... GOSUB to call the correct routine.

aes ccmememmcemn 7 a. __ es a - _. 7 a e a |. He ne rt ee i

ee

a ue ue

PEChE 2 ca anaiacttiat tie iC oe eae Hoa Be row :

Be 2 J a Bee

Z a

‘3 Posen Ai | d bg _ fe _ a _. ae ae _ Bait He

ae fs

a Bas

_ _ Hh eae i : a i _ _ _ a i -- : _ Ee

Ee

ae a Ls Hea

ae He

i ee if - Ss

: |

: ae es Hi a Rat .

a _

Be

f _ a | ies

i

Cea e a ah a a é _ aH oF He .

iy Ha a

| _ _ _.

Se

|.

_ a

- _ . a a :

Be a

Hi i

ce ae . _ ee _ ce . _ _ _ _ Poe .

: eae Ha ee

_ oe | | _ : _ it fe . a Hae _ _ a _ i

ee

_ i _ aiih : | i |

_ _ _

ee

ii

i i i : a _ Ha ae, dai _ . a : . i _ i oe | | oo |. B _ ae ee _ _ . 5 . i / . _ f _ Se : ee . . _ _ .

ee _ oe : . _ > oe _ a _

- oo . eee a a iL a a a en a _ : . _ a |. . o a _ _. _ i= ss. _.

He tH

i _

a i :

bis

Be

a _ LF : _ _| 159 DATAIGS, 193,123,252, 169,255, 160,0

a _ _ ee - _ _

He

i ae Ee oS . _ F . oe : Bae

a

Baa ae i _ a _ . i é

i Bit ie Ranaut i CL

. 278 DATAISG,192,254,0,193,76,156,192

i if

a

oo ee

. _

pie _ ae .

a . oo i i - _ a .

a by

_

oo

det ee _

He a ee i Eee a He i : L a E ae : a _ Hf

cpa Ei EE RO a ese 3 ay EE Seat a

Eee | ee oo ee ae He _ ae ie _ aa!

a _ - 6 | oe .

+ Ga

: Bene oe eh Be Hee 2

Bs He i a

ee ae a

: an: | BASIC Loader He

1@ REM oko OO OK OK nk

eo REM ** *

32@ REM *x BASIC LOADER FOR xx

Ne c 40 REM ** CBM ARM CONTROLLER «x

- SQ REM +x ‘x

| le BO REP soo ORR OK

Ea 5

7@ FOR T[=49155 Ta 493934

i 7S READ A:POKE I,A:CK=LEt+A

on Q@ NEXT I

9@ READ CStIF CS<>CG THEN PRINT"CHECKSUM ERROR": STOP 95: | 140 MATAIG9,255,191,3,221,169,62,141,1

118 DATAIS2,169,192,141,2,192,120,173

8 | 120 DATA2A,3S,.179,1,192,141,1,192,142

; 1380 DATA2GO,3.173.21,3,174,2,192,141,2

140 DATA1S2,142,21,3,169,16,133,251

ne

a ion

_

a

_ eee

179 DATA152,72,138,72,169,255,141,1

7] oe 16Q DATA1I45,251,126,208,251,88,96,8,72

-_ - 18@ NATAG21,162,7,169,255,24,186,72

_ . | CC Oo} 2 L : | oS LC oe a | 198 DATA1I88 ,O,.193,.49,251,145,251,104 PaBERR SE i

Be 3 a eee

ae Be Uaty Bee | _ 24@ DATA2@2,.16,243,160,.48,136,208,253 | .

d _

Hee ce

| 4 218 DATAI6S9,255,160,0,49,251,141,1,221

i a a

- _ | 220 DATA2Z9@,208,248,162,7,169,255,188

Babies

ae Bei H

230 DATAG,193,145,251,202,16,248,ia4

a 24@ MATAI7@,104,168,104,44,108,1,192

_ 250 DATA162,9,160,0,189,8,193,221,8 . a :

Se 260 NATAISS,.240,14,176,6,222,8,193,76

a ee

Bip iy _ He Hee ae

280 DATALZAA,232 ,224,4,208 ,228,32,169

oe o _ | 290 DATA192,.192,4,208,217,96,138,72

sa

a _ | 20@ DATAIS2,72,160,255,174,8,192,1326 a oo 318 DATAZ34 ,234,208,251,202,208,248 224 DATAIQ4, 168,104,170,96,8,255,255,8 SS 320 DATAG,255,255,0,0,255,255,0,0,255

ef i

Seno Bi

ss 24@ NATAZSS,@,0,72,138,72,152,72,32 350 DATA228 ,255,201,0,240,249,162,2 26Q DATAZ21,191,192,240,7,232,224,17 370 DATAZ98,246,162,255,142,207,192 380 NATAI@4,168,104,170,184,96

398 DATAS2097 : REM&kCHECKSUMs

_.

ae eey

i ea a see . aS a - _ HH He : a 2 ie

_ Le

oo _ ae .

KEVIN INES

Be yy a _ .

a |. THE HOME COMPUTER ADVANCED COURSE 1195

i. By BHT a _ Basen a \ as : a a a _ eee

He Bae ae

ee ae

iinet

ibs He

ei

e

a

&

Soest

Table 1

Table 2

SIGHT EFFECTS

We turn our attention to the Commodore 64’s video controller chip the VIC-II and look at how its registers can be used to

produce different display modes and

unusual visual effects. In the first of two parts, we consider low-resolution graphics, the ways that multicolour graphics can be

produced and how the VIC-II_ chip

organises its memory requirements

There are eight basic screen graphics modes on the Commodore 64. In low-resolution graphics the character set may be in ROM or RAM and displayed in one of three possible modes: Standard mode, Multicolour mode or Extended colour mode. Also, there are two high-resolution modes: Standard and Multicolour. In addition to these basic modes, a number of other variations are possible: the screen can be set up to have 38

columns, as opposed to the normal 40 columns,

and/or 24 rows, as opposed to 25. These last features are normally used in conjunction with smooth horizontal or vertical scrolling. The scrolling feature of the Commodore 64 is best run from machine code, since replacement display data needs to be shifted into the screen RAM fairly rapidly. On page 937 we designed a horizontal

smooth-scrolling program that used the 38-

column screen mode.

If a high-resolution screen is used in conjunction with a long program, then memory may be at a premium. The Commodore 64 allows considerable freedom in the location of both the low-resolution and high-resolution screen, so we will begin by looking at how the programmer can move them both around in memory. As we shall see in the next instalment, if you are using machine code to do the plotting, it is even possible to place the high-resolution screen behind the BASIC

Screen background

-Multicolour#1 _ Multicolour#2 _ Foreground colour

1198 THE HOME COMPUTER ADVANCED COURSE

interpreter ROM (see page 1137). When you think about it, this is a great idea because if you are only running machine code, the interpreter ROM would be taking up eight Kbytes of valuable memory space doing nothing useful! By an interesting coincidence, eight Kbytes is just what we need for a high-resolution screen.

It is the function of the 6566/67 Video Interface Chip (VIC-II) to generate the video display data, which is passed to the television or monitor. To do this, the VIC-II must be able to read data from.RAM or ROM. It is worth understanding the way in which the VIC-II obtains its data, since this gives rise to some of the more obscure behaviour of the Commodore 64.

MULTICOLOUR MODE

Normal low-resolution display and bit map mode for the Commodore 64 have been described in earlier instalments (see pages 214 and 337). In this section we take a look at two of the other ways the machine’s graphics can be used.

In Multicolour mode it is possible to have four colours within a single character cell, as opposed to two. There is a price to be paid, however, in that horizontal resolution is now in pairs of pixel dots rather than single pixels. Multicolour mode can be used in high- or low-resolution graphics, although the dot colours are determined slightly differently in the high resolution mode. The following POKEs from BASIC switch Multicolour mode on and off.

POKE 53270,PEEK(53270)0R16 POKE 53270,PEEK(53270)AND239

In low-resolution mode, when Multicolour is on, if bit 4 of the associated colour nybble (i.e. four bits, or half a byte) is one, then the character 1s interpreted in Multicolour mode, with the lower three bits determining the colour. This means that those characters that have associated colour nybbles in the range 0 to 7 are interpreted normally; whereas, if the colour code lies in the range 8 to 15, then the character will be displayed in Multicolour mode. The colours of the pixel pairs are determined as shown in Table 1.

By flipping the contents of addresses 53282 and 53283, we can instantaneously change the colour of every associated Multicolour pixel pair. It should be noted that Multicolour works best with user-defined characters that is, the bit patterns take into account the fact that they are interpreted as pairs. | 7

Another graphics mode available to the Commodore 64 programmer is Extended colour mode. This mode allows control over the background colour of the first 64 characters in the

character matrix. Extended colour mode cannot be used in conjunction with Multicolour mode. The following lines of BAsic turn Extended colour mode on and off, respectively:

POKE 53265, PEEK(53265)0R64 POKE 53265, PEEK(53265)AND191

The same character can appear on the screen with up to four different background colours, one of which is the screen background colour. The remaining characters cannot be displayed in Extended colour mode, since bits 6 and 7 of the screen code are used to control indirectly the colour of the character. For example, the screen code for ‘A’ is 1, and that of a reverse field ‘A’ is 65. However, if we POKEd 65 to the screen in Extended colour mode, we would not see a reverse field ‘A’ but a normal ‘A’ with a background colour determined by the contents of address 53282 (SD022). Similarly, POKEing 129 to the screen would produce a normal A’, but with a background colour determined by the contents of address 53283 ($D023). Table 2 shows how the screen codes and colour registers are related.

MEMORY MANAGEMENT

The VIC-II chip sees a different and far simpler memory map from the 6510. At any one time, the VIC-II can see only one of four 16 Kbyte blocks or banks of memory. We can think of this 16 Kbyte bank as the VIC-II ‘window’ onto memory. The base address of this window can take one of four values under software control.

1000 REM**SELECT BANK FOR VIC WINDOW**

1010 POKE 56578,PEEK(56578)0R3:REM DDR CIA#2 BITS 0,1 TO OUTPUT

1020 WD=3:REM THIS SELECTS NORMAL WINDOW

1030 POKE 56576, (PEEK(56576)AND252)0R WD: REM PORT A CIA#1 BITS 0,1

Here WD can take values in the range 0 to 3. At any time, the value of WD currently in effect is found as PEEK(565/76)AND3. ‘The corresponding address of the bottom of the 16. Kbyte window in memory is computed using the formula: WB=16384*(3-WD), where the value in WD gives the corresponding

addresses:

Within the VIC-II window the 6510 expects to see the screen memory and a character ROM image in low resolution (or high-resolution data if high- resolution mode is selected). It may also need to find sprite data, and if so will need to see this within the window. The pointers for each of the eight sprites are placed at the end of the screen memory (and so must be moved with the screen).

The offset of the start of screen memory from the base of the current VIC-II window is controlled by the upper four bits of the VIC-II control register at address 53272 ($D018). Using these four bits, we can place the screen at any one of 16 Kbyte blocks within the window.

1040 REM**SELECT SCREEN OFFSET FROM

BASE OF WINDOW** 1050 SO=1:REM THIS SELECTS NORMAL OFFSET 1060 POKE53272,(PEEK(53272)AND15)OR 16*SO

Here SO can take values in the range 0 to 15. At any time the value of SO currently in effect is found using PEEK(53272)AND15. The corresponding address of the base of the current screen in memory is computed using either SC=WB+1024*S0 (window base plus offset), or:

90=16384* (3—(PEEK(56576)AND3))+64* (PEEK (53272)AND240) 3

One problem in moving the screen about is that the colour RAM does not move. So, if we wish to have an alternate screen, we need a small machine code routine to swap the colour memory in and out of a buffer as appropriate. This was used as the basis for the alternate screens program for the Commodore 64, given on page 918.

A further factor to consider is that if you wish to PRINT to the new screen, then it is necessary to tell the operating system (as opposed to the video chip) where the new screen is located. This can be

done by a POKE (or STA) to address 648 ($0288),

which is a pointer that should contain the high byte of the screen memory base address. If SC is

computed as above, the following Basic code will do the job:

POKE 648, INT (SC/256)

To select the base address of the character matrix or high-resolution screen, we use the following code:

1070 REM**SELECT HIRES/CM OFFSET FROM BASE OF WINDOW**

HO=4:REM THIS SELECTS NORMAL OFFSET POKE 53272, (PEEK(53272)AND240)OR 2*HO

In principle, HO can take any value in the range 0 to 7, but in practice other factors limit the options. With WD equivalent to 1 or 3 we can’t allow HO to have a value of 2 or 3, since this is where VIC-II sees the normal ROM character image. Also, large values of HO will put the top of the high-resolution memory out of reach of VIC-II. The corresponding address of the base of the current character miatrix/high-resolution screen in memory is computed as: CM=WB+2048*HO (window base plus offset), or:

CM=16384* (3—(PEEK(56576)AND3))+1024* (PEEK(53272)AND 14)

By setting these registers, we can move all the video display memory around in any way that suits the needs of our program.

1080 1090

Colour Co-ordinated

In the Commodore 64’s normal display mode each bit set to one within the eight bytes that define a character is displayed in the current foreground colour. Any bits set to zero are displayed in the background screen colour. When multicolour mode is selected, the bit patterns are no longer interpreted as individual bits but as pairs. The four possible combinations of a pair of bits represent the foreground and background colours and two extra multicolours

d : F

oO 20 © © © @&e@ aoooo +o =— Qe ees SSO oo ooo 0o CO ©

n multicolour mode

00 O17 @&0 0.9 O00 ki ileal 00 04 10 O4 tC 0 1 4 1.4 10 0 1 f O20. 1. 0 01 toe At 410 O74 Qe OL - a0 O00. 80.00. 00 Key

01 MULTICOLOUR 1

10 MULTICOLOUR 2

11 FOREGROUND COLOUR

00 BACKGROUND COLOUR

THE HOME COMPUTER ADVANCED COURSE 1199

IAN McKINNELL

BAD MO

On In the ‘heels , f such ch popular favourites as Sabre Wulf and Atic Atac, Ultimate has now

‘introduced a new and thoroughly different type of game: Knight Lore. With three- dimensional graphics and a_ complete control of Sabre Man’s movements, this game is likely to become an even bigger

success among Spectrum games players.

: Ultimate has always been noted fae producing quality games for the Sinclair Spectrum. The

company has produced a long line of arcade-style maze games in which the player has to fight a way past strange and wonderful creatures that inhabit

_ the various rooms. In the meantime, the player

must also collect treasure, as well as pieces of

talismans and other mystical trinkets, which when

put together will complete the game. ‘Examples of this type are Atic Atac (see page 376) and Sabre Wulf (see page 433).

Despite these games’ popularity with Spectrum

owners, the company has now moved away from

the two-dimensional arcade adventure typified by

_ Sabre Wulf. Although bearing some similarities with previous Ultimate creations, Knight Lore is a very different type of game. The scenario is that a

knight (in fact, the hero of several previous adventures, Sabre Man) must search a wizard’s

~ castle in order to find the spell which prevents him

from permanently becoming a werewolf. The player has forty days and nights to find the answer, the passing of which are displayed at the bottom of the screen; and in the bottom right-hand corner is a window containing a ‘sundial’. During the day the player is Sabre Man. However, when the moon rises in the window, he is transformed, complete with convulsions in the best Lon Chaney manner, into the Werewulf. Luckily, this has no effect on the player’s ability to move around except during the transformation itself, which can be a nuisance if you are trying to avoid an oncoming gargoyle. On commencing the game, the first thing you will notice is the three-dimensional graphics that have been incorporated into the adventure. These graphics are the best yet to be seen on the Spectrum, including Ant Attack. Unlike Ant Attack, however, you are unable to change the viewing angle on Knight Lore, but this is compensated for by the ingenious ways in which the various rooms have been constructed. Knight Lore is not an arcade adventure per se, but rather a series of logic puzzles that have to be solved. In this respect, Knight Lore resembles the true adventure game, posing tough problems that have to be dealt with before any progress can be

1200 THE HOME COMPUTER ADVANCED COURSE

N RISING

made. Although many of the rooms are empty, others present you with challenges before you are able to get to the exit on the other side. One room, for example, is inhabited by small ghost-like creatures running around on the floor if they touch Sabre Man you lose a life.

The puzzles have varying degrees of difficulty. Some are comparatively easy, others are fiendish in their complexity, and some are merely red herrings. You may come to a room with blocks in it, for example, above which are large globes with spikes on them. Attempt to cross the blocks and these spikey orbs will puncture your enthusiasm the answer is to simply walk around the blocks! Another trick used by the programmers is to employ the distorted perspective one gets when seeing a two-dimensional representation of a three-dimensional space. Often, blocks that seem to be on the ground are in fact floating in the air, and should Sabre Man fall off one, there is no way out except by losing a life on the spikes and attempting to cross the room again.

In many of the rooms there.are objects to collect such as gems, chalices and potions. Picking them up, once youve reached them, is accomplished by jumping on top of the object and pulling the joystick back. This will place the object in your ‘inventory’ that is displayed at the bottom left- hand corner of the screen. This manoeuvre could be useful to gain extra height when climbing over an otherwise unscalable wall.

Sabre Man can move in all four directions by using either the keyboard or joystick. Jumping is performed by pressing either the Keys on the third row or the fire button. Correct orientation of Sabre Man is crucial to a successful game jumping in the wrong direction, for example, could be fatal. You may well spend the first few games simply getting used to ‘fine tuning’ the correct orientation since very slight movements of the joystick can alter the way Sabre Man is facing.

Knight Lore is a fascinating game and well up to Ultimate’s high standard. Even players who don't usually like encountering puzzles should find the game thoroughly absorbing, because the solutions to many of the problems require quick responses on the keys or fire button, as well as demanding a sharp and attentive mind.

‘| [ i :

: | BBC Micro

THE HOME COMPUTER ADVANCED COURSE | INDEX TO ISSUES 49 TO 60

.

Acorn Electron 1069-1071

_ | Acornsoft LOGO 1054 | ADA 987,

: ALGOL 60 987 | ALGOL68 987 _AMASE 1042 | AMPLE 1090 | AMX mouse 1050-1051.

_ Apple Macintosh 984, 1023, 1125,

1181 | Apricot portable 1009- 1011 _Arrays1146

Attributes 995

Background Music program 1118 |

| Base 988 ©

| BaseValue program 1180

BBC BASIC 1037-1039

_ adventure game 966- -968, 997-999, 1017-1020 AMX mouse 1050-1051

LOGO packages 1054- 1055

_ Operating system 978-980, 994-996, 1015-1016, 1037- 1039, 1056-1057, 1077- 1079, 1099-1100, 1117-1119

__robotarm SQUARE program 7 . simulation game 1052- 1053, 1066-1067, 1086-1088, 1106-1108, 1132-1133, | ‘1144-1145, 1172-1174, 1192-1194

|_| BCPL! 987 | Big Trak 1082 | Bingo! game 1116

Bulletin boards 981-983 Bumpers program 1036

_ Bus! network 969

Cc Ly

| C987

| CAL 1003, 1141 _ | CALL command 1056

Card = 1105

CASE statement 1047 CBBS 981 CD-ROM 1182-1183 Cheung, Paul 1082 Christensen, Borge 1122 Circular 1084 COBOL 987

CODASYL database 1165

| Cognitive skills 1022

Collector 988 | COMAL 1122 ©

: Commodore communications _

modem 964 Commodore 64 adventure game 966- 968, 997-999, 1017-1020 _ BASIC pointer table 1138 © _ clock program 1139- 1140 memory map 1137 ©

_ Operating systems 1137- ie 1

1157-1160, 1166-1167, —-1198- 1199 ports 1157 © _ robotarm nen program 1195-1197

_ simulation game 1052- 1053, |

1066-1067, 1086-1088, 1106-1108, 1132-1133, 1144-1145, 1172-1174, : 1192-1194 sound 961-962 vector table 1138

Communications 963- 965, 981- 983

Compound statement 1025

_ Compunet 963-965

Concurrent PASCAL 987 Conditional loop 1008

| Cray-1 1049 _| Critical path a 984

D

| The Dark Wheel 1040

Data types 1147

Databases 1097-1098, 1101-1103,

1104-1105, 1124-1125, 1152-1153, 1164-1165, - 1186-1187 dBase II 1152, 1186

| DBMs 1098

Dialog 1102

| Digitaya game 968, 1018-1020 _| Discovery 1 1154-1156 | Distances program 1136 | Domesday Project 1182 | 1064-1065.

= Econet 995. | Eon) 1001- 1003, 1021-1023,

1041-1043, 1061-1063, 1081-1083, 1101-1103, 1121-1123, 1141-1143,

1161-1163, 1181-1183

| Elite 1040 ©

_ Emitter 988

Enterprise Sixty Four 989-991 EPROM chips 1044-1045 _

Equality 1025 |

Eratosthenes’ Sieve 1148 Error handling 1038

Escher M C 972-973 _

- Events 1099- 1100

Factfile 1102

_ Farmfax 1064-1065 | | Fields 1104 _ Filevision 1125

Fischertechnik robotics kit : 1189-1191 FOR statement 1093

FORTRAN 987

Ghostbusters 1000

Golden program 1076 | | | Graphics Movement program 1119 _

Handicapped users 1041-1043

Haunted Forest game 966- 967, 998-999

| _ Hierarchical database 1164- 1165 | Homo Ludens 1063

Hybrid Music 500 1090-1091.

| IF statement 1046 ILECC 1161

Infra-red trackball 1011 Interrupt handling 1077-1079 Intrinsic programming 1002

ISO —_— 987

| Keys 1124 | Knight Lore 1200

1

LAN 969 Language workspace 1038.

| LDR test program 1058 _ _ Light pen 969

Line following program 1060

| Line printer 969 Line Tracer II 1084

Linear programming 1002, LISP 969 |

Local area network 969

Logging on 982, 988 Logic 969

Logic gate 988 ©

Logic state 988 Logic symbols 988

“LOGO 972-974, 1054-1055 1082-

1083, 1122 Logotron LOGO 1055 Loop 1008 |

| Low-level es 1008

.

Machine code 1008 Machine independent 1008

| Macproject 984-985

Macro 1028

Magnetic card 1028

Magnetic disk 1028 Mail box 1028 Mainframe 1049

Mark sensing 1049 Mass storage 1049

Matrix 1068

_ i | ber as statement 1092 1062 | Wirth, Professor Niklaus 98 | WITH statement 1135 .

“1175- 1177. 195-