PROGRAM PITSTOP
Your Sinclair, December 1990

Prog Pit - it's an oasis of calm within the frenetic chaos of YS,
isn't it, Spec-chums? A place to put your feet up, savour the
ingenuity of the programs and even win #50 for writing the best one
and sending it in. Which leaves us with JONATHAN DAVIES. (Nice
haircut, JD.)


Life, eh? But that's enough philosophy. Actually, I'm in a bit of a
'mood' at the moment. I can see daylight through my bedroom wall where
the builders have knocked a series of holes through it, you see, and
the wind and rain battering my shivering body are making it extremely
hard to type properly. But what do you care? All you're interested in
is this month's herd of programs, so it's probably just as well that
there are plenty of them once again. The only thing is that, although
they're all completely brilliant (as usual), they're not exactly
'original'. Hardened Pitstop readers will probably have seen similar
offerings before, but they'll no doubt be delighted to have a crack at
these newer versions.

The first is a Clock program from Charles Samson - just the job for,
erm, telling the time with. Then there's Nicholas Gill's Header Reader
for checking those suspicious-looking headers. And finally, after a
couple more fractal programs from Ben Smith, we've got a seasonal
Snowflake Creator by Chris Green.

I hope you have as much fun with them as I did.


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


WHAT'S THE TIME MR SPECTRUM?
by Charles Samson

Although the Spectrum's a wonderful computer and everything, it does
have one major problem. It doesn't display a little clock in the top
right-hand corner of the screen. So, while you're bashing away at the
keyboard, you've got absolutely no idea what time it is and can very
easily miss your tea or favourite television program. But luckily
Charles Samson has the answer. Despite recently having his computer
stolen he's managed to come up with a rather impressive program which
does indeed display a clock in the top right-hand corner of your
screen. What's more it'll stay there through thick and thin, whether
you're typing in another program or running one, so you've got
absolutely no excuse for missing anything ever again.

Getting the program working, as you can probably imagine, is a case of
typing in the Basic listing and saving it with SAVE "CLOCK" LINE 5,
followed by the hex section which is entered via the Hex Loader.
Reloading the program and running it will show you a list of
instructions, but that's about it. To get the clock working do the
following ...
	POKE 48601,seconds
	POKE 48602,minutes
	POKE 48603,hours
	LET R=USR 48573
The words 'seconds', 'minutes' and 'hours' should obviously be
replaced by those corresponding to the current time. The clock will
then appear and should keep perfect time (unless you LOAD or SAVE or
do something dumb like switching off the Spectrum). To get rid of it,
press Symbol Shift and Space together.


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


MORE FRACTALS, FORSOOTH
by Ben Smith

This month's degree-level maths lecture comes from Ben Smith who's
first of all come up with a program that demonstrates 'period-
doubling'. It shows a progression from order to chaos which occasionally
lapses back into order. (Actually it does it backwards for some
reason, going from chaos to order.) The equation used is x=Rx(1-x)
with R increasing slowly.

Ben also enclosed his version of the Strange Attractor. Astute readers
will have spotted this one way back when, but Ben's program is a bit
shorter and faster.


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


HEADER READER
by Nicholas Gill

So what's a 'header', then? Well, you know when you load a program it
goes sort of "Beeeeeeeee Blip! Beeeeeeeee Blipipipipipipipipipip ..."?
(Something like that anyway.) Well, the header is actually the bit
that goes "Beeeeeeeee Blip!", and this program from Nicholas Gill lets
you decode it. (I'm printing it even though he sent it on paper,
rather than tape, so I had to spend hours typing it in and my mood
worsened dramatically.) But why would you want to do that? The header
actually contains lots of 'interesting' pieces of information about
the chunk of code on the tape, like what it's meant to be and how long
it is. The Spectrum usually keeps all this to itself, but now you'll
be let in on the secret too. Very handy if you fancy yourself as a
hacker.

The program is entirely written in Basic (apart from a tiny little
machine code bit, but there's no hex to worry about), so all you've
got to do is type it in, save it by typing GOTO 9997 and then run it.
You'll be prompted to load in a header and, once you've done that, its
contents will be revealed.

I'll suspect you'll have problems typing it in in 128K mode, so select
48K mode first.


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


SNOWFLAKE CREATOR
by Chris Green

Although Chris Green's Snowflake Creator doesn't exactly represent the
height of Spectrum programming I thought I'd bung it in anyway as I
needed something to fill space. It might appeal to younger readers. Or
something. Maybe.

I hardly need explain that it generates snowflakes (it is just about
winter after all, so a few might come in useful). Type it in and run
it, and then decide whether or not to Save


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


