Mail Archives: djgpp/1999/05/12/16:40:30
From: | "Daniel Kadenbach" <kadenbach DOT h AT primus-online DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | înterrupt problem
|
Date: | Wed, 12 May 1999 22:11:31 +0200
|
Organization: | Debitel Network Services GmbH
|
Lines: | 39
|
Message-ID: | <7hcnbo$j0t$1@news.dnsg.net>
|
NNTP-Posting-Host: | hildesheim1.pop.metronet.de
|
X-Newsreader: | Microsoft Outlook Express 4.72.3110.5
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hi all !
I am just trying to program a serial-port-interface (via uart-programming)
and therefore need to bend the
irq of the com2 port to my own function, but i don´t get it to work ...
My code looks like this:
new_handler.pm_offset = (int)int_uart;
new_handler.pm_selector = _go32_my_cs();
_go32_dpmi_get_protected_mode_interrupt_vector(0xb, &old_handler);
_go32_dpmi_allocate_iret_wrapper(&new_handler);
_go32_dpmi_set_protected_mode_interrupt_vector(0xb,&new_handler);
the Interrupt function:
static int int_uart( void )
{
asm("cli; pusha");
test++;
outportb(0x20, 0x20);
asm("popa; sti");
}
...so test should be increased if an irq occurs, but it doesn´t...
I managed to get it to work under dos by additionally masking the irq via
port 21h, but that crashes under win95, so there should be an other way...
(i´ve also seen some source-code which uses the allegro-function
_install_irq(...) for this task, but i am not able to use it in my code... )
hope someone can help me, thanx !
the lost Seeker
aka Daniel Kadenbach
- Raw text -