From: Erik Rull Newsgroups: comp.os.msdos.djgpp Subject: Problems with protected_mode_int Date: Tue, 11 Jan 2000 22:45:16 +0100 Organization: tesion Communikationsnetze Suedwest GmBH & Co.KG, Stuttgart, Germany Lines: 61 Message-ID: <387BA46C.80EC24DF@bluewin.de> NNTP-Posting-Host: stu1ir9-101-15.ras.tesion.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.6 [de]C-CCK-MCD QXW03207 (Win95; I) X-Accept-Language: de,en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I've tried something with the protected_mode_int, which makes my system crash everytime. First I wrote a programm that increases a timer variable when the timer-int occurs. Then I inserted a system() call that calls another programm, with the active timer-int. But during the call, the system crashes. Can you help me to fix this problem? To make it easier for you, I'll add the sources of the programms to this mail. Thanks for helping me! The programm that contains the system() call: #include #include #include volatile int tics = 0; void timer_handler() { printf("Tics passed: %d\n",++tics); } int main() { _go32_dpmi_seginfo old_handler, new_handler; printf("grabbing timer interrupt\n"); _go32_dpmi_get_protected_mode_interrupt_vector(8, &old_handler); new_handler.pm_offset = (int) timer_handler; new_handler.pm_selector = _go32_my_ss(); _go32_dpmi_chain_protected_mode_interrupt_vector(8, &new_handler); getkey(); system("timer3.exe"); printf("releasing timer interrupt\n"); _go32_dpmi_set_protected_mode_interrupt_vector(8, &old_handler); printf("Time : %d",tics); return 0; } The programm called by system(): #include main() { printf("Timer3.exe is running!\n"); } P.S. I'm still using version 2.6.3 (1.12 maint3), because no other works...