[comp.binaries.ibm.pc.d] Handling Critical Errors Under DOS

rjspitzig@rose.waterloo.edu (Roger Spitzig) (08/04/88)

I am trying to write a TSR or device driver that will trap the DOS critical
error interrupt 24 when the printer is not turned on during a printing
operation.  DOS's normal way to handle this is the "Abort, Retry, Ignore"
message.  This causes screen update problems with many of my applications.
What I want to do is trap the int 24h and if it is an error writing to
a printer (PRN, LPT1,...) I want to pop up a window of my own that will 
save the screen and restore it after the printer has been reset.  
Unfortunately, when you do a TSR, the int 24h vector is reset by DOS.  
Surprisingly, this even happens if you set the int 24h storage vector in
your PSP which is where DOS should be getting the reset value.
Does anyone have any ideas or SOURCE for performing such an operation?
Any help at all would be greatly appreciated.         Roger Spitzig 

simcha@humming.UUCP (Simcha Lerner) (08/07/88)

In article <8110@watdragon.waterloo.edu> rjspitzig@rose.waterloo.edu (Roger Spitzig) writes:
>I am trying to write a TSR or device driver that will trap the DOS critical
>error interrupt 24 when the printer is not turned on during a printing
>operation. (stuff cut here)
>Unfortunately, when you do a TSR, the int 24h vector is reset by DOS.  
>Surprisingly, this even happens if you set the int 24h storage vector in
>your PSP which is where DOS should be getting the reset value.
>Does anyone have any ideas or SOURCE for performing such an operation?
>Any help at all would be greatly appreciated.         Roger Spitzig 


The best source of information on how to do successful TSRs is in
Microsoft's DOS Encyclopedia - they have a whole chapter on it.

Not having my copy of this tome readily available, I can not give you
an authoritative answer.  However, if my memory is correct, all will
work fine if you inform DOS of the change of active task (active PSP)
as your task is entered and exits.  DOS keeps much task dependent
information around (including information for resident "terminated"
tasks) which is often critical - I have seen hard disks wiped out
when people tried to do file i/o from background with an uncooperative
foreground task.

If you need further information, feel free to email me.

Simcha Lerner

harvard!humming!simcha
^^^^^^^
NOTE: bbn will not forward me mail.

Opinions?  You mean I'm allowed an opinion!