PROGRAM PITSTOP
Your Sinclair, November 1988

It's into The Pitstop to burn rubber on your ZX keyboard with a bundle
of routines put together by David McCandless.


You know programming isn't such a chore. It's not as complex or as
difficult as you might think. Once you understand it, then it's a case
of "practice makes perfect". And you don't need a brain the size of
Scunthorpe either. Take me for example (Do we have to? Ed) I can
program in Basic and Machine Code as well as the next man, but I'm not
exactly God's gift to metaphysics. All you need is time, the tools,
the practice and the patience.

Timewise I expect it will only take you about a day to absorb the
basics and language. Then all the tools you need are books on the
subject (Melbourne House print the best) and an assembler if you intend
to use machine code (get those from HiSoft). The practice comes when
typing in and examining simple programs, like some of those printed
here. And the patience, well only you know where that comes from.

Talking about simple programs, there'll be a load in Pitstop next
month because of a spectacular Screen Effects Special with almost
every routine in graspable assembly language. Look out for it.

In this month's column however you'll have to make do with plain old
hex I'm afraid, because I've a few more amateur (though you'd never
know it) routines for you to wow, gosh and generally dribble over.
Joseph Lynass is first with his P.I.M. (pointer/icon/menu) program
that defies being summed up by just one superlative ('cor' in other
words). After him there's an expansion of Simon Hobbs' Mega Text by
Wayne Ambrose. And then, our regular psychopath, Thurstan Felstead has
bulletted back from strait- jacket land with his cunning Flowchart
Creator. And then, to end with, we have Tom Baker's long overdue (and
indiscriminately cut by the Art Editor's righteous scalpel) program
which places your machine code program in data statements to save you
the hassle. They're all yours, a mere hex loader away ...


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


WINDAS
by Joseph Lynass

At last! The time has come! A Labour government? The Apocalypse? Well
no, not Armageddon, but something equally devastating and uncomfortable
for Macintosh owners (RIP). Yes, the time has come for you humble and
affronted Speccy owners to stand up, widen your eyes, stick out your
tongue, and say: "Scoffetty, scoffetty, scoff, scoff!" or words to that
effect. Why? Because at last you can experience the thrills and - to
risk a cliche - spills of using a pointer/icon/menu environment,
courtesy of sixteen year old Jospeh Lynass from tropical Belfast.

Method
This program is so easy to get up 'n' running. Firstly, type in the 80
(as in 80 - not very many, considering) lines of hex and then save the
subsequent code with SAVE "name" CODE 50000,638. Then (and only then)
may you type in the brilliant demo program just to see how, er,
brilliant this routine really is.

PIMs Anybody?
The PIM system was originally developed on the Apple Macintosh ages
back at the twilight of home computing. And it was such a brilliantly
designed and simple system to use that it was ripped off and strewn
across several million computer formats. The idea is to direct your
pointer (normally an arrow) around the screen, pulling down menus and
selecting files represented by icons (small symbols), the advantage
being that since everything is graphic oriented it can be used by any-
body of any nationality, amateur or professional.

Information
Each window is stored from 50700 onwards in this five byte format:
* 1st byte is the window number (0-254)
* 2nd byte is the top left Y (vertical) co-ord (0-23)
* 3rd byte is the top left X (horizontal) co-ord (0-31)
* 4th byte is the bottom right Y co-ord
* 5th byte is the bottom right X co-ord

The maximum number of windows allowed on-screen at one time is 40, and
always remember to POKE a 255 after the data for the last box. To
display the window use: LET w=USR 50000. This way, when you select a
certain window, the number of that window returns in 'w'. So, if you
select window 11 then w=11. Understand? Good. If w=255 then no window
has been selected.

When the pointer arrow is on the screen use keys Q,A,O,P to move it
around and M to select a window or SPACE to abort. Simple or what?


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


MEGATEXT 2
by Wayne Ambrose

Aeons ago, in a dusty edition of Pitstop, there was a program called
MegaText by Simon Hobbs. It allowed you to print in all manner of
weird 'n' wonderful styles such as bold, curved, italic, skewered and
so on. Now, here's Wayne Ambrose with an adaptation of that program to
make it even more user-friendly and powerful (blimey!).

Method
Using the hex loader (from Windas) type in the machine code and then
save it with SAVE "name" CODE. Then enter the Basic program and save
that with SAVE "name" LINE 10.

Controls
There are two modes available - normal and large. Normal mode shows
you all the keys and is for experimenting with styles. Large mode uses
the same keys and is used for trying different sizes.

Using O and P will decrease and increase the style number (0-255).
Press M and you'll be able to type in the style number. Q and A effect
the height, stretching it taller or snapping it smaller.

And in this way you can mix styles and heights to find the most
effective combinations, y'know.


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


FLOWCHARTER
by Thurstan Felstead

Rarely does a month go by without a manifestation of insanity appearing
on these pages. And as per usual this month, it's Monsignor Thurstan S.
Coolman Felstead OBE, now with his loyal disciple and fellow fruitcake
Francois S.L. Dooby Esq who have, in a double dose of dementia, written
[collected roar of approvement] the Flowchart Creator.

Flowing Charts
Just in case you were wondering, flowcharts are diagrams used to plan
the operation of programs. Different types of operation are
represented by different shaped boxes. A diamond is used for a
question, a parallelogram for an input and so on. The idea is to
keep the main stream of the program centralised and branch out
sideways for sub-routines. They're not used so much these days -
programmers sit down and Machine Code just spurts from their pores -
but they still remain a valuable asset to a would-be programmer.

Program
Firstly, type in the program and save it to tape. Afterwards load in
your Basic program and then MERGE in the Flowchart Creator. Run it
with GO TO 9824 and follow the on-screen prompts. The program will
create a flow chart for your program.


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


DATABANKER
by Tom Baker

Tom Baker hmmmmm, that's a familiar name. Doctor Who? Naaahhh. Fastape
routine printed in the October 1987 issue? Yeahhhh! I remember now,
Tom's routine was the best of the fast loaders we received. Well,
Tom's come up tops again with his incredibly (and at the same time,
very concise), valuable program to create data statements and lines of
your own code.

This program is of value to anyone who has a huge chunk of code in
memory and can't be bothered to put it into data statements. So here's
Tom's program to do all that for you. Wowsers!

Method
To get this working, simply type in the listing and save it with SAVE
"databanker" LINE 10 and you're all set, (goooooo!).

Banking
Right, to get you lot out there to learn how to work this bijou prog,
we shall go through an (imaginary) working example. Sitting
comfortably? Then I shall begin.

You have some code at 60000 which is 120 bytes long and you want to
put it into data statements. Do you:
a) Scream, shout and pull your hair out - you can't stand DATA?
b) Use Tom Baker's Data Banker program?
c) Go "yibble, yibble" - you've had enough of machine code?
The correct answer is, of course, 'b'. Now edit line 50 of the
program. It will look like this:

50 LET f=0: LET addr=0: LET len=60

Change the line so that it reads:

50 LET f=0: LET addr=60000: LET len=120

Easy innit (peeps)? Now RUN the routine and data lines will appear at
lines 9000 onwards in this format:

DATA "(*address), no. of bytes of line (max=40) data bytes separated
by spaces, checksum"

The program itself is in two sections. The first section (10- 220) is
the part which assembles the code into DATA, and the second part
(1000+) reads the data and makes sense of it. Geddit? Good, now no
complaints.

Basic Program
Here it is, quite short for what it does, and I'm quite surprised that
Tom used Basic instead of machine code, but there you are.


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



BYEE!
Right, that's all we've got time for this month. Keep your bazzy
routines a 'rollin' in to me, David McCandless, Program Pitstop, YS,
14 Rathbone Place, London W1P 1DE. And remember the best one printed
wins a #50 cash prize. Coo!

