🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #776

Re: my_tsr

#776
From: Azrak
Date: Wed, 18 Nov 1992 14:26
41 lines
2317 bytes
c.brennan@student.utas.edu.au (chris brennan) writes:

>In article <smithbm.721597007@craft.camp.clarkson.edu>, smithbm@craft.camp.clarkson.edu (Azrak) writes:
>> 
>> vincent@datmuc.UUCP (vincent) writes:
>> 

>> If you wish, I will post one of my TSRs for you to look at, but remember
>> that it is completely in 8088 assembly, and I am not a CS major. The
>> program might not be as efficient as possible, however it is quite
>> stable and will not crash very easily.
>> 
>> - Brian  (smithbm@craft.camp.clarkson.edu)
>> 
>> As for my opinion for why it crashes, try saving all registers used
>> in the interrupt routine. At least you will be at a "known state" and
>> can go from there. Just remember to POP all registers in reverse order
>> at the end of your routine.
>> 
>Hi Brian, 

>your actual code was deleted when i read this article, but a frequent
>problem which arises when writing tsr's is using DOS calls.

>Dos is NON re-enterant. so you can not use calls to dos without first checking
>the 'inDos' flag.  If Dos is busy and you still make a call, it will result in a 
>corrupted stack and the system will crash.

>-Bye Chris.  
> email: c.brennan@student.utas.edu.au.

Hmmm. People are getting confused about who had the trouble. It was
vincent@datmuc.UUCP that had the trouble. I tried to explain what I
thought the trouble was, and offered to post an assembly TSR. I don't
believe Vincent was using DOS inside the TSR. Like you say, it is bad news
to do so. I think his trouble was the fact that he wasn't saving the DS
register and possibly others, which were being modified inside the called
TSR routine (which hooked the timer INT). With TSRs, if you touch it, you
save it first!

- Brian
Technical Details
Message-ID: <smithbm.722096804@craft.camp.clarkson.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!clarkson!smithbm
References: <1348@datmuc.UUCP> <smithbm.721597007@craft.camp.clarkson.edu> <1992Nov18.025048.16933@newsroom.utas.edu.au>

Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!clarkson!smithbm
From: smithbm@craft.camp.clarkson.edu (Azrak)
Subject: Re: my_tsr
Message-ID: <smithbm.722096804@craft.camp.clarkson.edu>
Sender: news@news.clarkson.edu
Nntp-Posting-Host: craft.camp.clarkson.edu
Organization: Clarkson University
References: <1348@datmuc.UUCP> <smithbm.721597007@craft.camp.clarkson.edu> <1992Nov18.025048.16933@newsroom.utas.edu.au>
Date: Wed, 18 Nov 1992 14:26:44 GMT
Lines: 42