🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++.leda
Article #123

Need examples of how to setup a TimerIrq Handler....

#123
From: Simon van Tongeren
Date: Mon, 09 Oct 1995 09:02
41 lines
1328 bytes
Hello,

Is there anybody outthere who could supply me with some examples of
how I can setup a TimerIRQ Handler???
I use borlandC/C++ (3.1) and I have trouble using the SETVECT &
GETVECT functions.
If I do the same as shown in the example inside the helpfile I get the
following error message(s):

*error: can't convert (void)(interrupt near)*. to (void)(interrupt)*..
--> refered to setvect ... statements!
*error: call to non-function... -> refered to OldTimerIrq();

This is what I tried to do:

#define __CPPARGS
#define TIMERIRQnr  0x8

void interrupt (*OldTimerIrq)(__CPPARGS);

void interrupt NewTimerIrq(__CPPARGS)
{
	.....
	....
	OldTimerIrq();
}

void main()
{
	OldTimerIrq = getvect (TIMERIRQnr);
	setvect (TIMERIRQnr, NewTimerIrq);
	.....
	....
	setvect (TIMERIRQnr, OldTimerIrq);
}

What am I doing wrong, or is there someone who is kind enough to send
me a working source....????

Thanx for the help,
Simon
Technical Details
Message-ID: <45as09$55e@news.euro.net>
Path: arc1-ca.pugleaf.net!news.euro.net!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.euro.net!usenet
From: savant@euronet.nl (Simon van Tongeren)
Newsgroups: comp.lang.c++.leda
Subject: Need examples of how to setup a TimerIrq Handler....
Date: Mon, 09 Oct 1995 09:02:05 GMT
Organization: Beatless Software Holland
Message-ID: <45as09$55e@news.euro.net>
NNTP-Posting-Host: p027.asd.euronet.nl
X-Newsreader: Forte Free Agent v0.55