HOW TO GIVE YOUR BEEB A DRAG FACTOR
SOME people find even Basic programs too fast, especially people
learning to play a new game or possibly disabled folk. So here
is a simple program to slow them down a little.
It will work with any Basic program provided that the variable
U% is not used - this can be easily changed, see later - and it
will work with some machine code programs (if zero page locations
&70 to &90 are not used, and the interrupt is not disabled).
Load it before your usual program. Full instructions are on
the screen.
All it does is put two nested loops (with nothing inside them)
into the interrupt routine, so that the computer does a few loops
every 100th of a second to slow it down.
In the program the registers are pushed onto the stack, X is
decremented down from 40 (this can be changed in line 120), and
Y is decremented from the value in U% (values from 2 to 5 work
best).
The registers are then pulled back from the stack.
If U% is used in your program, change U% in lines 10 and 50
to some other single letter integer variable, and, in line 120,
change &454 - the location where U% is stored - by 4 for each
letter difference.
For example, to change to T% change the location to &450
; V%=&458 ; W%=&45C ; and so on.
Avoid A%, P%, X%, Y%. If you want to avoid variables altogether,
but make the speed more difficult to change, alter line 120 to,
for example, 120 LDX#40:LDY#3.
Have fun experimenting! You can see how much the machine has
slowed down by typing the following (or put it in a function key):
TIME=0:FORI=1 TO 1000: NEXT: PRINT TIME
Note that as U% rises above 6 letters are missed if you do not
depress them long enough as you type.
A value of U%=4 causes this simple test to take approximately
twice as long as usual.
By PETER DAVIDSON