delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/07/04:05:11

Date: Sat, 07 Apr 2001 09:42:50 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Eduardo TUDA Lorenzetti Pellini <dochell AT MailAndNews DOT com>
Message-Id: <2110-Sat07Apr2001094250+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp AT delorie DOT com
In-reply-to: <3AE73146@MailAndNews.com> (message from Eduardo TUDA Lorenzetti
Pellini on Fri, 6 Apr 2001 13:42:06 -0400)
Subject: Re: Basic IRQ mapping ... What am I doing wrong ?
References: <3AE73146 AT MailAndNews DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019