Mail Archives: djgpp/1998/09/26/20:15:42
From: | Gero Timann <geti AT mcis DOT de>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Reprogram the PIC under CWSDPMI ?
|
Date: | Tue, 22 Sep 1998 12:17:26 +0200
|
Organization: | MediaCompany Goe
|
Lines: | 69
|
Message-ID: | <36077936.34BC97E1@mcis.de>
|
NNTP-Posting-Host: | x142.mcis.de
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello DJGPP-Fans !
For my PFDSP-Project i'm looking for a way to minimize the overhead in
an interrupt-routines. One way to save interrupt-time, is to leave out
EOI:
Messures:
1) saves about 2 microseconds from about 2.5 micro_s, great!
2) under Win95(-DPMI) you can do this without problems, saves
9micro_s on a P166 - Win95 service seems to emulate this with IRET
- standard dpmi-server like cwsdpmi, pmode or emm386 (DRDOS, very long
interrupt-duration, not usable for my project) don't do this, EOI is
needed
Is there a way to reprogram the PIC (82C59A) to Automatic EOI-mode ?
The first idea
void pic_auto_eoi(char s1,char s2)
{ WORD buf;
asm("cli");
buf=pic_get_status(); // save OCW1
// Master
outportb(0x20,0x11); // ICW1
outportb(0x21,0x08); // ICW2
outportb(0x21,0x04); // ICW3
if (s1){ // ICW4
outportb(0x21,0x03);PicAutoEOI[0]=1;
}else{
outportb(0x21,0x01);PicAutoEOI[0]=0;
}
// Slave
outportb(0xA0,0x11); // ICW1
outportb(0xA1,0x70); // ICW2
outportb(0xA1,0x02); // ICW3
if (s2){ // ICW4
outportb(0xA1,0x03);PicAutoEOI[1]=1;
}else{
outportb(0xA1,0x01);PicAutoEOI[1]=0;
}
pic_set_status(buf); // Restore OCW1
asm("sti");
}
does't work. Why ?
Thanks for your comments.
Regards,
Gero
--
___________________________________________________________________
Dipl.Phys.Gero Timann
Schülerstieg 20
37081 Göttingen
Germany
Tel./Fax: Germany-0551-96782
EMail:
geti AT mcis DOT deREMOVE_THIS
geti AT spock DOT physik3 DOT gwdg DOT deREMOVE_THIS
geti AT online DOT deREMOVE_THIS
____________________________________________________________________
- Raw text -