SHORTCUTS
ZX Computing, October 1986

Ray Elder presents an expanded Short Cuts this month reflecting the
programming talent of ZX readers. So if you have an astonishing
routine hidden away why not flaunt it in Short Cuts. Remember there's
#10 awarded for published routines and the #20 Starcut prize for the
outstanding mini- programme of the month.


- - - - - - - - - - 
SOUNDING OUT
[file: Sensor]

Robert Glavas of Bury supplies our first program, a routine to detect
sound entering the cassette port. This could form the basis of many
programs. He supplies us with a demo showing how it could create graphs.

A couple of points. First, some older computers need to be allowed to
warm up for about five or ten minutes before the signal settles to a
standard, and secondly you have to provide the sound!

This can be done in several ways, either connect a microphone to the
ear socket, but this may not be very successful, or record a word or
message and play it back into the Spectrum by the usual lead, or put
your recorder into "play" and speak into the built in mic.

Testing 1, 2, 3, 4. Testing 1, 2, 3 ...


- - - - - - - - - - 
SOUND KIT ERROR

R.J. Kamphuis is a programmer who hails from The Netherlands and is a
regular ZXC contributor and he has asked us to make a correction to
his last published program.

In the program we published in our July issue the code should have
read in the THIRD line 35,126,35, etc and NOT 35,125,35. Slap on the
wrists all round, but meanwhile here is another sample of his work, a
simple but interesting machine code routine to convert numbers between
0 and 255 to Hexadecimal. [file: DecToHex]

Load the program and RUN it. Lines 9, 10 and 20 contain the main
M.Code [There's no line 9, but it works anyway. JimG] and to use it in
any adaptation of your own POKE 64000 the number, call 64002 and
collect the results as CHR$ from 64000 and 64001. A little exercise
would be to make it deal with numbers greater than 255 (I have, for my
own use!).


- - - - - - - - - - 
DOUBLE UP
[file: Double]

And now to Tim Rance of Bucks. He sent a short, simple BASIC routine
to print a message in double height. I know we have used other
variations before, but it's neat and there must be thousands of new
readers who are looking for such a routine!


- - - - - - - - - - 
VU-CALC CONTROLLED
[file: VU-CalcPRT]

Another reader from Holland, J.K.H. van den Bosch sent us a routine to
allow all users of VU-CALC to print out onto a proper printer,
although there is a built in COPY for Sinclair type printers, only
four columns are printed at a time.

To use this program make sure your DATA has been saved then quit the
program, NEW the computer and LOAD and run the program given. Lines 1,
2 and 3 include interface control codes for the Kempston E Centronics
I/F. They perform the following functions and you may have to modify
them if you are using a different I/F.
Line 1. Turn the Sinclair tokens off.
Line 2. POKE 23679 sets the number of characters per line.
Line 3. Checks, and puts the printer into condensed mode if the number
of characters per line is greater than 80. Some printers may print
more without needing to be changed, and some printers may use
different codes, check your manual.

A useful program. Anyone done anything similar for VU-FILE?


- - - - - - - - - - 
CASSETTE LABELLER
[file: Labeller]

Finally for this month is a program from Lawrence Millea of Liverpool
and it produces cassette labels for the actual cassette on a Sinclair
or Alphacom or compatible printer.

The main problem he found in writing this program was that a correct
sized label wouldn't fit on the paper, so he solved it by printing it
sideways!

And so who gets this month's coveted Starcut award? (and twice the
normal fee!). Well this month we were unanimous in awarding it to
Lawrence for his cunning routine, and tidying up of our office tapes!

Bye for now, and keep 'em coming!
