delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/02/05/09:01:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <dont_have AT bitbucket DOT cmm>
Newsgroups: comp.os.msdos.djgpp
References: <43E12016 DOT 2070308 AT mainstreetsoftworks DOT com> <7t88b3-d2q DOT ln1 AT news DOT infowest DOT com> <43E1863D DOT 8080308 AT mainstreetsoftworks DOT com> <fgt8b3-c4u DOT ln1 AT news DOT infowest DOT com> <43E216B4 DOT 70509 AT mainstreetsoftworks DOT com> <43E243F8 DOT 7060401 AT mainstreetsoftworks DOT com> <1o8ab3-2i71 DOT ln1 AT news DOT infowest DOT com> <k2qab3-d7b1 DOT ln1 AT news DOT infowest DOT com> <43E2C6DA DOT 4080700 AT mainstreetsoftworks DOT com> <4mcbb3-q1f1 DOT ln1 AT news DOT infowest DOT com> <43E3884C DOT 8050308 AT mainstreetsoftworks DOT com> <0naeb3-s442 DOT ln1 AT news DOT infowest DOT com> <43E587DC DOT 6080801 AT mainstreetsoftworks DOT com>
Subject: Re: TSR issues (with code)
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-IWN-Posted-By: [68.60.59.250] Sun Feb 5 05:49:55 2006
Message-ID: <js8hb3-7kq2.ln1@news.infowest.com>
X-Complaints-To: abuse AT eli DOT net
X-Trace: 52616e646f6d49564b835516cab6b1f728cd0aaad111e06a2859ca5fe614c2a3fdb4d17c804a296421caf04f2ab9f8219a26aea5bdfd9b5132cf95da425927ad80cac364056e5cd1b9d7cdfd905df1c571546f1867a83f7e58a410778656f46d3fb06d32a75307d044eb0b7f9b7e8dd63136489d7e27704258d45a088e7795ebb78f6de83fb42e9cf9e6061c220440fb
X-Abuse-Info: Please be sure to forward ALL headers so that we may process your complaint properly.
NNTP-Posting-Date: Sun, 05 Feb 2006 13:50:02 UTC
Date: Sun, 05 Feb 2006 13:50:05 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Brad House" <brad AT mainstreetsoftworks DOT com> wrote in message
news:43E587DC DOT 6080801 AT mainstreetsoftworks DOT com...
> Wow, thanks!  I think the crutch of the problem was I was
> using ds instead of es for the indos flag ... stupid stupid.
> Also, the realmode interrupt handler for int28 greatly helps
> my other needs as far as also needing to hook the BIOS calls
> as well. I need to create my own 'inBios' flag in order to make sure
> my TSR is bullet-proof (since I may need to call DOS and BIOS
> calls from within my TSR), so hooking those, incrementing an
> inbios counter, calling the previous hooks, then decrementing
> the counter should do that as per the Art of Assembly DOS
> reference on TSRs:
>   http://maven.smith.edu/~thiebaut/ArtOfAssembly/CH18/CH18-3.html
>
> Once I get that code squared away (and hopefully working flawlessly),
> I'll be returning that code to the public domain, so the next
> guy should be able to just plug the code into any relevant
> program.

Good luck.  As soon as you add write() back in, you'll hit the reentrancy
crash.  Probably some simple logic isn't correct.  Hopefully, it is an easy
fix, since I think the INDOS/IDLE flags are now correct.  But, if not, there
is an alternative way to deal with DOS reentrancy.  From DOS 4.0, you can
save and restore the Swappable Data Area (SDA) using int 0x21, ax=5d06h or
ax=5d0bh.  The SDA's size is larger if INDOS and smaller if idle.  I have no
further information on how this works other than Andrew Schulman's
"Undocumented DOS" has information.  I mention this because you want
"bullet-proof."  If you find anything on the web on this, other than Ralph
Brown's Interrupt list info, let me know.

Thanks and your welcome.

Rod Pemberton


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019