PROGRAM PITSTOP
Your Sinclair, February 1991

Fresh back from, um, nowhere actually (his parents didn't want
him home for Christmas, so they just sent him a Tesco mince pie
and 30p to buy a carton of cream with instead), it's JONATHAN
DAVIES with loads more of his labyrinthianly-length listings!



Boredom can strike at the most inopportune moment, can't it, readers?
Only this morning, for example, I was halfway down the stairs when it
suddenly dawned on me that there'd be nothing to do when I got to the
bottom. I turned round to retrace my steps, only to realise that
upstairs was equally amusement-free. I just had to stand then for
about half an hour trying to think of something, however trivial, to
pass the time. Nothing sprang to mind, so I just had to do Pitstop
instead.

This month's first listing comes from a couple of thoroughly Swedish
#50- winners called Per Nordqvist and Svend Jacobsen, and it's the
first half of a really very impressive, erm, 'thingy' program. And hot
on its heels is William Fraser's slightly technical Evaluator routine
- just the job for evaluating things.

Let's just hope they've found a decent photo this month, eh? (Not a
chance. Ed)


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


EFIL (part 1)
by Per Nordqvist and Svend Jacobsen

It's a bit of a spooky one, this. Not only has it been written by Per
Nordqvist and Svend Jacobsen (who, in case you're becoming convinced
that I make all these names up, actually come from Sweden), but it's
also a sort of psychedelic, 'hippy' type of program. (Yeah? Andy) The
other thing about it is that it's apocalyptically long, so I've
decided to spice things up by doing it as a cliff-hanging
'two-parter'. So this month you've got the first chunk of the Basic
section, the rest of which will be printed next month along with a
brief hex section and some detailed instructions.

So what's it all about, then? Well, remember last month's Life
program? You do? Well this is roughly the same sort of idea, but a lot
more complicated and interesting to look at. (The more astute among
you will already have realised that Efil is Life spelt backwards.) For
a start Efil is in colour, and that's where things start to get
complicated. Although Efil uses Life's method of generating new cells
by looking at the cells surrounding them, the calculations it does are
a lot more complicated. And you actually get some say in the matter
too.

What the program does when it's generating a new cell is to look at
some of the squares surrounding it (you decide which ones) and then
add up all their colours (with 0 for black through to 7 for white). It
then looks up the answer in a table of rules (which are also specified
by you) and finds the colour of the new cell. This is done for every
cell on the screen, luckily using machine code so it's super- fast.

Other features of the program include adjustable screen-update speed,
from really slow to migraine-inducingly fast, a cell-designing
section, a screen designer, something about 'border colours' which I
haven't quite sussed out yet and a series of built-in demos to give
you a better idea of what's going on.

So make a start of the listing, then, and try to control your
excitement until next month. It'll be worth the wait, I can assure
you.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =



EVALUATOR
by William Fraser

If you've ever tried to write a program that deals with mathematical
equations and other such complicated number thingies, it may have
occurred to you that there's no obvious way of actually getting the
equations into the computer (unless you actually build them Into the
program to start off with of course, which isn't much use).

It would be much handier if there was a way of getting our
rubber-keyed chum to ask you to type in equations while the program's
running, but unfortunately there isn't. Or, that is, there wasn't.
(Bet you weren't expecting that.)

By using William Fraser's routine all you've got to do is INPUT the
equation into Z$ and then RANDOMIZE USR 64000. The routine then calls
the appropriate ROM routine to evaluate the equation and returns the
answer in the variable y.

As a special added bonus William's incorporated the routine into a
graph- plotting program so you can see exactly what's going on. All
you've got to do is type in the Basic listing (missing out all the
instructions if you want, of course) and save it onto tape.

Then simply fish out the Hex Loader from a previous YS (the November
issue would do fine) and use it to type in the hex listing, which
should be saved after the Basic. Reload, run and you're away.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


PROGRAM PITSTOP
Your Sinclair, March 1991

In which JONATHAN DAVIES ponders the unhappy ritual of having one's
hair cut off, and introduces the second instalment of the very Life-
like Efil ...


If there's one thing I really can't stand (apart from having to think
of a topical Pitstop intro every month) it's having my hair cut.

You sit down and the first question you're asked is "What can I do for
you?" Eh?! Then you sit there having your head pushed from side to
side until, finally, he holds a mirror up and stares at you
enquiringly. You stare back at him enquiringly until he puts down the
mirror, removes the polythene sheet from your shoulders and brushes
lots of hair clippings down your neck. As if to compensate for all
this you're then presented with a paper tissue. Why?

Happily this month's Pitstop is haircut- free. Instead it contains the
second pant of P Nordqvist and S Jacobsen's utterly brilliant Efil
program, so type, type, type.


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =


EFIL (part 2)
by Per Nordqvist and Svend Jacobsen

Last month I gave you the first bit, and now here's the second bit of
Per and Svend's indecently long but enormously enjoyable Efil. To
recap, it's a sort of hybrid Life program which works in full colour
and has loads of options you can tweak. But you know that already.
What you need to know now is how to get it running and what to do once
it is.

Well, the first part's easy enough - just follow the usual tried and
tested Pitstop routine. Type in the whole of the Basic section
(including last month's bit) and save it onto a tape. Then fish out a
copy of the Hexloader from a previous YS and use it to type in the
hex. Save that after the Basic, reload the whole thing and away you go.

Once it's loaded you'll be presented with a complicated and slightly
baffling menu screen. Fear not. Look more closely and you'll see that
it can be split up into the following sections ...

Affectors: Each cell on the screen is surrounded by eight others, and
here's where you tell the program which of these cells affects the
cell in the middle. Use Symbol Shift together with keys 1-8 to toggle
the affectors on and off, C to reset all affectors, F to set them all,
R to restore them and Space to exit this section.

Rules: Lots of numbers, or possibly only a few, depending on how many
affectors you've set. When the values of the affectors surrounding
each cell are added up a number is produced. Here's where that number
is looked up in order to produce the colour of the cell. Use keys Q,
Z, I and P to move around the list, 8 to move to the start, 0-7 to
select a colour, C to set the whole list to the selected colour, R to
restore the list and Space to exit the section.

Edit: Here you can edit the screen directly to set up a starting
pattern of some sort. Use Q, Z, I and P to move around the screen, 0-7
to select a colour, M to set a cell to the current colour, C to set
the whole screen to the current colour, R to restore the screen and
Space to exit.

Graphics: This is where you can edit the shape of the cells to make
them look a bit nicer (if you want to). Use Q, Z, I and P to move
around the grid, M to toggle a square on and off, C to clear the grid,
F to fill it up, R to restore it, 1 to select a normal cell and 2 to
select a chequered one. Space exits.

Colours: I still haven't worked out what they're on about here but,
assuming you do, here are the keys you'll need - Symbol Shift plus 1-8
selects an affector, 0-7 to select a colour, C to set all to the
current colour, R to restore and Space to exit.

Tempo: This sets the screen update rate, from 255 (agonisingly slow)
to 1 (unfeasibly fast); 0 single-steps. You'll need to type three
digits each time, so for speed 6 type 006, etc.

Demos: A handy section this, as it lets you choose from 10 pre-defined
demo set-ups [Select 0-9. JimG]. Should give you a better idea of what's
going on than any of the above waffle.

Start: This sets the ball rolling, as it were, so sit back and enjoy
the show. And press Enter to single-step or Space to exit.

