From: sean Newsgroups: comp.os.msdos.djgpp Subject: Re: Lemmy try again. Date: Mon, 05 Oct 1998 23:10:09 -0700 Organization: http://www.supernews.com, The World's Usenet: Discussions Start Here Lines: 73 Message-ID: <3619B440.45F2C3AC@loop.com> References: <36195172 DOT E3866A8F AT loop DOT com> NNTP-Posting-Host: 207.211.62.157 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: 907653953 WUENVH4GT3E9DCFD3C usenet54.supernews.com X-Complaints-To: newsabuse AT supernews DOT com X-Mailer: Mozilla 4.02 [en]C-DIAL (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi again, sean wrote: > Hi, > > In DOS with DJGPP, not using Allegro. > I'm programming simple code that reprograms the Timer Interrupt. > The OLD ISR function gets stored in the 'pm_offset' variable of a > '_go32_dpmi_seginfo' structure. > I need to Call the OLD ISR again, from within the NEW ISR I create. > But, its stored as a variable, not a Interrupt Function like in Real > Mode compilers. > > Originally some code I found works, given that I don't ever have to use > the OLD ISR again. > So, I tried this: > > _go32_dpmi_seginfo new, old; > > // I added this > void (*oldISR)(); > > void newISR() > { > ... // my stuff > > // here's where I'll be calling the OLD ISR again > oldISR(); > > ... // my stuff > } > > void reprogramTimer() > { > ... //some stuff, gets the pointer to the OLD ISR, puts it into the > 'old' structure variable > > // And added this > (int)oldISR = old.pm_offset; > > // which leaves me to wonder how to get 'old.pm_selecter' as > well > > ... //other stuff > } > > This concept Crashes. > Do I need to Enable or Disable Interrupts a certain way? > > Please, any other methods I should consider? > > I'll appreciate any help :) > Thanks In Advance. > --Sean Ok... I've found s'more code. It appears that if I used all REAL MODE interrupt vectors, then I can use '_go32_simulate_fcall_' to re-run the OLD ISR. But, If I'm using Protected mode vectors, then there is no need to re-run the OLD ISR 'tall :) Does this seem correct? Thanks In Advance. --Sean