PROGRAM PITSTOP
Your Sinclair, October 1990

He's sexier than Senna, madder than Mansell and pretty porkin' pluckier
than Prost. His name is JONATHAN DAVIES and this is his column (oo-er).

Gerbils, eh? Mine just won't keep the noise down, and I haven't slept
in weeks. No matter though. We've masses to get through this month so
let's check out the starting grid.

In pole position is Rick O'Neill with another of his earth-shattering
scrollers - Distorted, er, Scroller. Close behind him is Daniel Cannon
with the wacky sampler you've all been waiting for. And bringing up
the rear it's, well, me actually. With a hex loader. (Just thought
it'd clarify a thing or two for the terminally thick among you. Nice, eh?)

Right. Vroom. Here we go.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

DISTORTED SCROLLER
by Rick O'Neill

Oh blimey, surely not another scroller? But wait! This one's a real
cracker. Not only does it scroll the message of your choice across the
middle of the screen, but it also wobbles it up and down and ripples
rainbow colours across it. All at the same time. (Now I can see you're
interested.) It's been written by none other than Rick "I've Got The
Scrolls Real Bad" O'Neill, the chap who wrote Swiss Scroll back in the
June issue. He's obviously into these things pretty heavily.

The Procedure
The program's an absolute doddle to get working. Just type in the
Basic listing (using stars or something instead of those funny
crossed-out 0s in lines 120 and 130 - they're just my printer being
crap) and SAVE "SCROLLER" LINE 10. Now load up the Hex Loader and use
it to type in the hex listing, specifying 64512 as the start address
and SCROLLER as the filename. Save the resulting code after the Basic,
reload it and watch the amazing demo. Not bad at all, eh?

To use the scroller in your own programs, all you have to do is put
the string you want to scroll into L$ and RANDOMIZE USR 64512 to "hit
it". As well as the usual letters and numbers there are three special
characters you can use ...

CHR$ 124 - This pauses the scroller for half a wave, leaving the message
bouncing up and down. Multiple use will allow you to stop it for as long
as you like.
CHR$ 255 - Repeat from the beginning.
CHR$ 0 - Stop. The scroller can also be halted by pressing Space, except
when it has been paused with CHR$ 124.

Line 105 in the Basic program contains the variable BOLD. Setting this
to 0 turns bold off, and setting it to 1 turns it on. And if you don't
like what happens to the colour, POKE 64680,201, and with 33 to turn
it back on. Address 64686 holds the speed of the colour cycling, which
is initially set to 5.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A SAMPLER THAT WORKS
by Daniel Cannon

And I know it does because I've heard it. You may remember there was
another sampler in Pitstop a year or two ago, and you may also be one
of the people who sent an angry letter of complaint in when you found
it didn't work (the probability that you are is approximately one in
three). The problems were due to a hitch at our end rather than
anything to do with the program itself, but as it was a bit beyond
repair I've decided to print this one by Daniel Cannon (of Minstrel
fame) in the hope that it'll pacify you all a bit. It works, and
what's more it's extremely good.

Instructions
To avoid the risk of another hex dump disaster, the program's in
Basic, with lots of nice Data statements for you to type in. So bash
it in and save it with SAVE "Sampler" LINE 10. Run it, wait for it to
sort out the machine code and you'll be presented with a line moving
slowly across the bottom of the screen. Now try playing some music or
something through the ear socket from your tape deck. Behold! The line
moves up and down, drawing a graph of the input. Now, if you press R,
sound will be recorded into the computer's memory for about five and a
half seconds. Then press P to play it back. Amazing, eh? You can also
change the length of the sample recorded by pressing T and typing in a
number of bytes. This number is calculated as the number of seconds'
recording time multiplied by 5500 (so use 11000 for two seconds). And
you can load and save samples so that they can be used in your own
programs.

To use samples in your own programs, you'll need a CLEAR 32767
statement, a LOAD "" CODE 32768 to load in your sample and a RANDOMIZE
USR 32829 to play it. Samples are saved with a copy of the playback
routine built in, which is pretty handy. You can also change the
length of the sample from within your program by doing:
POKE 32834,time-256*INT (time/256)
POKE 32835,INT (time/256)
Do this lots of times for the old N-N-N-Nineteen effect and all that
sort of rubbish.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

HEXLOADING - THE SECRET OF SUCCESS

This is a Hex Loader ...

[Listing omitted here. JimG]

And to use it do the following ...
1 Type it in, save it to tape and run it.
2 Locate a likely-looking hex dump.
3 When asked for the Start Address, enter the first number in the dump.
4 When asked for the Filename, use the one in the instructions if one is given.
5 One by one you'll be given a series of addresses corresponding to the numbers
  down the left-hand side of the hex dump. Next to each of these, type in the
  list of characters on that line of the dump (but don't put the spaces in -
  these are there to make it easier to read) and press Enter. Now enter the
  checksum.
6 The line you just typed should be printed across the top of the screen and
  you'll be prompted for the next line. If the program says "Error" you've
  mistyped a character or two. Don't worry, just type the line in again.
  (If the program says anything else, you're doing it all wrong. Start again
  from the beginning.)
7 Repeat for each line of the hex dump.
8 When you get to the bottom, where it says STOP, press Symbol Shift and A
  and then press Enter. The hex will be saved to tape, and you've done it!
