Article View: alt.msdos.programmer
Article #172Problems hooking to int 21h
From: Robert Schmidt
Date: Thu, 16 Apr 1992 15:42
Date: Thu, 16 Apr 1992 15:42
31 lines
1808 bytes
1808 bytes
I'm writing a small TSR to flash the Scroll Lock LED as a hard disk
activity indicator. I've successfully hooked onto interrupt 13h, but
I found that this interrupt doesn't get called quite as often as I thought.
Then I started trying to hook onto interrupt 21h, to trap some of it's
disk actions (opening/closing files, searching for files etc.). I use
int 21h itself to read the previous vector/set my new vector. I guess
this shouldn't be the problem?
Then I copied the interrupt handler that I wrote for Int 13h to another
proc, which does exactly the same:
- at entrance it toggles the LED
- then it calls the old interrupt handler
- then it toggles the LED again
- then it returns with an iret
This compiles and links alright (TASM & TLINK), i run it and am returned
directly to the DOS prompt as I'm supposed to be... But when I do any
serious disk activity, the PC crashes (by not serious I mean that 4dos'
file name completion feature works... I can also change disks and dirs.)
I know I should have supplied the source code... but I'll try this first...
--
Regards from Robert Schmidt, PC C/asm is my game, fast graphics is my
pain - Watch for my VGA/SB demo!
e-mail to robert@solan.unit.no
snail-mail to Stud.techn. Robert Schmidt, stud.post 170,
Norwegian Institute of Technology, Trondheim, NORWAY
Technical Details
Message-ID:
<1992Apr16.154256.6855@ugle.unit.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!Germany.EU.net!mcsun!seunet!sunic!ugle.unit.no!solan1.solan.unit.no!robertShow Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!Germany.EU.net!mcsun!seunet!sunic!ugle.unit.no!solan1.solan.unit.no!robert From: robert@solan.unit.no (Robert Schmidt) Subject: Problems hooking to int 21h Message-ID: <1992Apr16.154256.6855@ugle.unit.no> Sender: news@ugle.unit.no (NetNews Administrator) Organization: Norwegian Institute of Technology Date: Thu, 16 Apr 92 15:42:56 GMT Lines: 31