Mail Archives: djgpp/2000/01/13/14:34:41
From: | Erik Rull <erik_rull AT bluewin DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Still problems with protected_mode_int
|
Date: | Thu, 13 Jan 2000 17:44:31 +0100
|
Organization: | tesion Communikationsnetze Suedwest GmBH & Co.KG, Stuttgart, Germany
|
Lines: | 68
|
Message-ID: | <387E00EF.58796444@bluewin.de>
|
NNTP-Posting-Host: | stu1ir8-101-92.ras.tesion.net
|
Mime-Version: | 1.0
|
X-Mailer: | Mozilla 4.6 [de]C-CCK-MCD QXW03207 (Win95; I)
|
X-Accept-Language: | de,en
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hi,
I've read your Mails about my problem, and I've changed it as good as
possible.
But it still remains.
First: In plain DOS, the ISR isn't called, but every other things work
(the system() call). With printf() and cout <<... nothing appears.
Then in W95 in a DOS - Box: The ISR is called and outputs the ++tics,
and it's the same result when I use printf() or cout <<...
When the getkey() is passed, windows returns with the following message:
Error at: 0028:C003D8B6
V86MMGR(01)+0000006A
IRQ:0 (no "blue screen")
?????
And the system hangs up...
What I finally want to achieve is, that the interrupt routine continues,
when the other programm runs. But I don't think, that there's a good
solution.
#include <pc.h>
#include <dpmi.h>
#include <stdio.h>
#include <iostream.h>
volatile int tics = 0;
void timer_handler()
{
cout << "Tics passed: " << ++tics << "\n";
}
int main()
{
lock(timer_handler); // I don't know, if it's right. The error
occurs with and without it!!!
_go32_dpmi_seginfo old_handler, new_handler;
_go32_dpmi_get_protected_mode_interrupt_vector(8, &old_handler);
new_handler.pm_offset = (int) timer_handler;
new_handler.pm_selector = _go32_my_cs();
_go32_dpmi_chain_protected_mode_interrupt_vector(8,
&new_handler);
getkey();
cout << "Running \"system()\"\n";
system("timer3.exe");
_go32_dpmi_set_protected_mode_interrupt_vector(8, &old_handler);
cout << tics;
return 0;
}
programm called by system():
#include <iostream.h>
int main()
{
cout << "timer3.exe is running\n";
}
- Raw text -