Mail Archives: djgpp/1996/06/24/01:33:53
Xref: | news2.mv.net comp.os.msdos.djgpp:5313
|
From: | neligan AT odyssee DOT net (Mitran Marcel)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Hookingi nterrupts in C++
|
Date: | Mon, 24 Jun 1996 14:22:01 GMT
|
Organization: | Odyssee Internet
|
Lines: | 26
|
Message-ID: | <4qku2p$447@pegasus.odyssee.net>
|
Reply-To: | neligan AT odyssee DOT net
|
NNTP-Posting-Host: | pool28_11.odyssee.net
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi,
I'm trying to write a simple program that hooks the timer interrupt in
C++. Here's my basic strutrure:
class TIMER{
protected:
volatile long ticks = 0;
new_timer_handler();
public:
TIMER();
~TIMER();
};
The constructor hooks the interrupt while the destructor unhooks it,
no problem. However, since the new_timer_handler() is invoked by the
interrupt, it doesn't get passed a this pointer right? So I am then
unable to reference the ticks variable since I don't know for which
specific instance of the object the interrupt has hooked. Does anyone
know a way how to solve this, I'm relatively new to C++.
Thanks,
Patrick Mitran
neligan AT odyssee DOT net
- Raw text -