Xref: news-dnh.mv.net comp.os.msdos.djgpp:2015 Path: news-dnh.mv.net!mv!news.sprintlink.net!cs.utexas.edu!math.ohio-state.edu!cis.ohio-state.edu!nntp.sei.cmu.edu!fs7.ece.cmu.edu!cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!newsfeed.rice.edu!rice!news!sandmann From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Bulletproof interrupt handlers?? Date: Mon, 11 Sep 1995 20:53:52 CDT Organization: Rice University, Houston, Texas Lines: 14 References: <432jde$mvm AT dfw DOT nkn DOT net> Reply-To: sandmann AT clio DOT rice DOT edu Nntp-Posting-Host: clio.rice.edu To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp > I have been working on writting interrupt handlers for the timer, mouse, > and keyboard for several days now, but I'm still not quite sure exactly > what needs to be done to make them "bulletproof"? I know that all > stack, code, and data sections that your interrupt handler could possibly > use needs to be locked into memory. Is that correct? Yes, this is correct. There are two ways to do this. One way is to write the interrupt routine in assembler (.S) so you know exactly the extent of the code and data you touch, and can arrange it in a manner which is easy to lock, then lock those very few bytes. The second is to just lock everything your program might touch. This would be everything from 0x10a8 to sbrk(0). This final approach is what needs to be done in the default wrapper routines, but I (and everyone else on the V2 project) has just been too busy to get to it.