PROGRAM PITSTOP
Your Sinclair, January 1990

Students, eh? Don'tcha just love 'em? They're the ones with a free
alarm clock for each of their seven bank accounts. And no-one more so
than cuddly JD! Wake up, sexy, you're on!

It may be nearly Christmas for you lot, but at the time of writing I'm
recumbent in my study-cum- bedroom at the wonderful University Of
Kent. Within my reach lies the phenomenal power of a ten mips HLH
Orion running Unix (Eh? Ed), accessible through Uniterm on my ST.
Blimey. But I've still managed to lay all this aside and root out the
old Speccy (which survived the journey admirably). I'll just give you
this month's line-up, and then return to the subsidised Ruddles.

Topping the bill this time is our old friend Anthony Purvis with his
amazing technicolour Slo-Trace. This enormous asset to any programmer
is closely followed by, wait for it, a Machine Code Mandelbrot
generator! At last! And you can be sure AH Trewartha's done a pretty
nifty job on it.

One piece of news which may interest you is that in a gesture of
seasonal goodwill the #50 prize for Program Of The Month has been
reinstated after an absence of a few issues. Hoorah. This means that
as well as unimaginable fame, instant worldwide recognition and all
the rest of it, having your work displayed in YS can now bring you
lucky people undreamt-of wealth. More than I've ever known, anyway.
(Liar. Ed).

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

SLO-TRACE
by Antony Purvis
from Your Sinclair, January 1990

As well as fashionably omitting the 'w' of its name, Slo-Trace
distinguishes itself by being completely ace. You've probably all seen
a Trace program before. Anyone? No. Right. What they do is continuously
display the number of the line and statement currently being executed
while your (or anybody else's) Basic program is running. This is
remarkably handy for debugging, and can be put to 101 other uses.
(They elude me just now.)

Mind boggling, isn't it? But that's not all. Purv has once again
shattered the limits of Spectrum programming, dismissed with a
flourish of his hand the old machine's repressive impotence and come
up with yet another startling innovation. You can now slow down your
program while it's running to any speed you like to allow you to study
its intricacies in more detail. And then, of course, you can speed it
up again.

This incredible processing power comes at very little cost to your
fingertips. A mere 400 or so bytes of hex, a little Basic and you're
there. Well, the other way round actually. Bash in the Basic, save it
and then hammer in the hex using the hex loader. There are two bits of
hex, one to handle the interrupts (which are what make it work) and
the other bit is the routine itself. They'll need to be typed in and
saved separately. 

Done that? Oh. Well, I'll carry on anyway. Contained in the Basic
program is all the info you'll need to get it going. The Trace routine
kicks in automatically, and the slowing down bit is controlled by
holding down Space and pressing '1' or '2' to alter the speed. The
border informatively indicates the rate things are running at. You get
it all on a plate, don't you?

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

SON OF MANDELBROT
by A.H. Trewartha

I'm not going all through what a Mandelbrot set is again - check out
issue 47 if you need an explanation (although you'll probably end up
none the wiser). This Mandelbrot generator beats all previous ones
hollow by virtue of its being written in 100% fabbo Machine Code. It
also manages to get around (sort of) the usual lack of colour in these
things by using shades of grey. It's a bit tricky to use, so don't
whap it in unless you're fairly sure what you're doing.

Having entered the painlessly short hex listing using the hex loader,
saved it and breathed a sigh of relief, CLEAR 59999 and LOAD "" CODE
60000. Then LET l=USR 60000 followed on the same line by five numbers
to define the parameters of the set. An example would be LET l=USR
60000-2-1.2+3.2+2.4+35 (which draws the whole set), where the first
two numbers are the coordinates for the bottom left hand corner of the
bit you want to plot, the next two are the width and height and the
last one is the maximum number of iterations that will be performed on
each point.

The only thing we're missing now is a routine to easily let you zoom
in on parts of the set without having to fiddle about with numbers and
things. AH sent one, but it was a bit crap so I'm still looking.

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

Cock-Up Corner
As many of you pointed out, with varying levels of self restraint, I
made a bish in issue 46. With Hex Loader V2 to be precise. The trouble
is that the hex code overlaps in memory the hex loader that you'll
need to enter it with, so if you try to type it in as it stands you'll
get an Out Of Memory error. Oops.

Never fear - the solution is simple. Enter the start address as 35000
instead of 25000, and type in the hex as if all the addresses were
10000 higher. When you get to the end, save it as normal by typing
STOP (Symbol Shift and A). Then reset the computer; CLEAR 24999 and
reload the code with LOAD "" CODE 25000. Finally save it out again,
after the Basic loader, with SAVE "hexloaderc" CODE 25000,712. This
will definitely work. Honest.

Bye
Don't forget that with the return of the #50 prize you have absolutely
no excuse for not coming up with at least something for me over
Christmas. Anything will do, as long as it runs on a Spectrum and is
utterly fab, so chuck a copy on to a tape and send it to ... Jonathan
Davies, Program Pitstop, Your Sinclair, 14 Rathbone Place, London W1P 1DE.
