home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
pcmag
/
vol6n05.arc
/
THREECOM.ARC
/
THREECOM.DOC
< prev
Wrap
Text File
|
1987-02-22
|
3KB
|
51 lines
Three COMs
(PC Magazine Vol 6 No 5 Mar 10, 1987 User-to-User)
These three small assembly programs help to smooth out three
separate DOS problems.
(1) If you use your PC's floppy disk drives frequently, you
probably spend a lot of time waiting for the disks to stop spinning
so you can safely switch them. The memory-resident FASTOFF.COM program
turns off the drive motor much more quickly than the standard IBM PC
does. Normally the motors are turned off 37 ticks (about 2 seconds)
after the last disk access. FASTOFF reduces this time by decrementing
the elapsed time counter twice as fast as normal.
A single byte located in the ROM data area is used to maintain
the number of ticks remaining before the motor will be turned off.
Part of the system timer's job is to decrement this byte and turn off
the drive motor when the counter reaches zero. FASTOFF uses the timer
tick interrupt, which occurs 18.2 times each second, to decrement this
same counter. Since this program addresses the ROM-BIOS data area,
it will work on an IBM or a very close compatible only.
(2) It seems that after every print screen, the next step is
always to take the printer off-line and press the form feed to eject
the page. The memory-resident FFEED.COM program will add a form feed
character automatically after the print screen operation is complete.
Since at times the form feed is undesirable, FFEED adds it only if the
Right Shift key was used with PrtSc.
It works by intercepting interrupt 5, which occurs whenever the
keyboard detects a Shift-PrtSc. It then tests the keyboard status to
see which shift key is being held down. If it is the right one, the
FF character is sent to the printer when the screen dump completes.
FFEED is also smart enough to check to see if the printer is
on-line and ready before beginning the screen print. If the printer
is not ready, the screen dump is aborted to prevent the keyboard from
locking up. This is done by making a printer status call before giving
control to the ROM routine. It's odd that such a simple check was not
included within the standard ROM routine.
(3) For a young child or an inexperienced typist, the auto-repeat
feature of most keyboards may cause lots of unwanted duplicate
keystrokes. The memory-resident NOREPEAT program eliminates the
auto-repeat no matter how long a key is held down.
It works by using interrupt 9 to examine each keystroke. Normally
this detects when each key is depressed and when it's released. When
a key is held down long enough to repeat, the keyboard simulates the
key's being depressed again and again without being released. NOREPEAT
senses these unwanted duplicate keystrokes and then prevents them from
being inserted into the keyboard buffer. When the key is finally
released, new keystrokes are again allowed to occur normally.