From: "TeddyLam" Newsgroups: comp.os.msdos.djgpp Subject: Re: Automatic EOI in DJGPP Date: Fri, 20 Oct 2000 22:33:04 +0800 Organization: IMS Netvigator Lines: 51 Message-ID: <8spl4n$8qb1@imsp212.netvigator.com> References: <8sls17$6bk30 AT imsp212 DOT netvigator DOT com> <8smp19$iku$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <8sp1s3$2bh3 AT imsp212 DOT netvigator DOT com> <9003-Fri20Oct2000133109+0300-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: tswc3a074.netvigator.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Eli Zaretskii" wrote in message news:9003-Fri20Oct2000133109+0300-eliz AT is DOT elta DOT co DOT il... > You seem to assume that, when you turn on the automatic EOI, all the > normal PC features continue working as before. For example, you do > still want the timer tick interrupt to occur, right? > > Also, how do you manage to know what interrupts do you need? The > library and the DPMI server might use interrupts behind your back > without your knowledge. > > As another data point, the excellent book "The Undocumented PC" > clearly says that ``Automatic EOI is not a real option on any PC > system". > > However, if you want to turn on auto-EOI, go ahead, it's very easy. > Just don't come back crying telling that you haven't been warned... Thanks for all your suggestions and warnings :-) Actually, the program is already working.... in 28800bps, I've just made it!! The interrupt I'm using....right, it is just the IRQ0 timer interrupt. The interval can be altered by internal 8254 counter, so I can produce any data rate I want, ideal for my application. I can send you the source code if anybody dare to test. Just run it and check the signal on digital scope. Close loop the ports and you will get 0 error rate readings. Of course, it is still very preliminary, but it do work! Since I've already replaced ISR of timer interrupt by my own, therefore I suppose DPMI can't do anything behind my back. Am I right? please tell me if I'm actually wrong. Turning on auto-EOI is not just so stright forward in DJGPP. I suscepts that the ICW2 (Vector base address?) is not 0x08h as usually should be set to. Every time after I set up the 8259, the program crash immediately, no matter whether I set or clear the auto-EOI bit. Please give me a help if anybody can. Another factor that prevents me from further increase the data rate, is that it seems when you issue EOI by writing 20h to 8259, the DPMI will thinks that the protect mode ISR fails, it then switch to real mode and call the real mode ISR routine. I read this from the README of PCTIME14 program. I've varified this by hooking both real mode and protect mode ISRs. I haven't chainned the real mode ISR as PCTIME14 do, but the real mode routine really can affect the output!! I think except using Auto-EOI, there should be another method to prevent DPMI from calling the real mode ISR? isn't it? Please tell me the method, if this is not a bug. Teddy Lam