From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem with interrupt handling Date: Mon, 6 Oct 1997 18:59:03 +0100 Organization: None Distribution: world Message-ID: References: <3438C9AE DOT 2BBD AT art DOT alcatel DOT fr> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 23 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Olivier PERRON writes: > _go32_dpmi_allocate_iret_wrapper(&info); > _go32_dpmi_set_protected_mode_interrupt_vector(0xF1, &info); [snip] > __dpmi_int(0xF1, &r); I've never tried hooking a software interrupt with djgpp, so I could be totally wrong about this, but I think you are issuing that call in the wrong way. The __dpmi_int() function calls the real mode interrupt handler, but you have only installed a protected mode handler (according to the DPMI spec, hardware interrupts are automatically reflected into protected mode but software interrupts are not). I think you will need to generate the interrupt directly by issuing an asm "int" instruction... If the goal of this program is to eventually make it hook a hardware interrupt instead, you should be aware that calling printf() from an irq routine is not a good idea! -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.