From: sean Newsgroups: comp.os.msdos.djgpp Subject: Lemmy try again. Date: Mon, 05 Oct 1998 16:08:35 -0700 Organization: http://www.supernews.com, The World's Usenet: Discussions Start Here Lines: 58 Message-ID: <36195172.E3866A8F@loop.com> NNTP-Posting-Host: 207.211.62.200 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: 907628888 WUENVH4GT3EC8CFD3C usenet52.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, 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