MAGAZINE\MOTOR.DOC  ·  DOC  ·  1.5 KB  ·  1991-01-01  ·  from PCPlus_Issue-52_Jan-1991_FluxEngine-360Kb
MOTOR    by Wilf Hey


An accompanying debug script file (MOTOR.BUG) creates a program that allows you
to change the length of time the MOTOR is left on from the first moment of data
transfer: the program created (called "MOTOR") takes a one-character operand,
a number from 0 to 9.

"0" causes the diskette motor to stay on for about 14-15 seconds; this is
desirable to prevent the loss of a second or two between loading diskettes
when you are intentionally switching them, and are sure that the write-heads
are not in use: for example, when quickly listing table-of-contents.

Operands from 1 to 9 set the motor to keep running for that number of seconds.
The results of this program are "non-permanent".  That is, rebooting the
computer will "lose" the values.

If an invalid operand is keyed, the program terminates without effect, and
sets ERRORLEVEL to 1.

Suppose you are satisfied with a normal MOTOR timeout of 3 seconds; put a
command "MOTOR 3" in your AUTOEXEC.BAT.

The .COM program is present already made, but you may like to do it yourself
for practice, or for further information: it should be done by keying the
following command from the DOS prompt:

                DEBUG <MOTOR.BUG

Note: the "open angle bracket" is essential to the process: it tells DEBUG to
take its orders from MOTOR.BUG rather than from the keyboard.

Note that the line above the lone "W" is intentionally BLANK; comments
are not necessary - but we thought you'd like to know what the coding does..

The resultant program is only 54 bytes long!