Mail Archives: djgpp/2001/04/07/04:05:11
> From: Eduardo TUDA Lorenzetti Pellini <dochell AT MailAndNews DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 6 Apr 2001 13:42:06 -0400
>
> I'm trying to hook a &^@&^#&^ IRQ with my DJGPP program.
> I hate to post code on the newsgroup, but i don't have more options.
> The program is running over plain DOS (IO.SYS, MSDOS.SYS and COMMAND.COM
> ONLY).
Are you sure this is plain DOS? Does that machine has Windows
installed? If so, please describe how did you boot it into plain
DOS.
Also, what do you load in CONFIG.SYS and AUTOEXEC.BAT?
Finally, are you using CWSDPMI as the DPMI server? What version of
CWSDPMI?
> I'm trying to hook IRQ 0 - System Timer Interrupt (0x08) with no sucess.
> I can hook INT 0x1C, but i need the real IRQ ISR INT 0x08
> 8((
> Please, if you have time, take a look to this (minimum) code and tell me
> what
> is wrong. It works for INTERRUPT = 0x1C, but don't for 0x08.
What does it mean ``doesn't work''? Does the counter in the interrupt
routine stay at its zero value, or does something else go wrong?
> Do i need to hook the real mode 0x08 interrupt ? Or both the protected and
> real mode ones ?
Hooking the protected-mode interrupt is all you need. Hardware
interrupts are always reflected to protected mode.
I don't see anything wrong in your code, except that I'd suggest to
explicitly disable interrupts (with a call to disable()) before you
call hookint in your main function, and then re-enable them with a
call to enable().
- Raw text -