ftp.delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | "Jordar" <rrcdaniel AT sbcglobal DOT net> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | porting from borland |
Date: | 6 Nov 2006 08:50:01 -0800 |
Organization: | http://groups.google.com |
Lines: | 30 |
Message-ID: | <1162831801.086285.199260@h54g2000cwb.googlegroups.com> |
NNTP-Posting-Host: | 65.67.51.194 |
Mime-Version: | 1.0 |
X-Trace: | posting.google.com 1162831806 5571 127.0.0.1 (6 Nov 2006 16:50:06 GMT) |
X-Complaints-To: | groups-abuse AT google DOT com |
NNTP-Posting-Date: | Mon, 6 Nov 2006 16:50:06 +0000 (UTC) |
User-Agent: | G2/1.0 |
X-HTTP-UserAgent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) |
Complaints-To: | groups-abuse AT google DOT com |
Injection-Info: | h54g2000cwb.googlegroups.com; posting-host=65.67.51.194; |
posting-account=rQ0tLw0AAABlxfVSZZfLGXLmQpwv2fH6 | |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hi, I am porting a program over to DJGPP from borland 5.01. It wasn't too bad. In fact it was too easy... My program compiles and runs but my interrupts never are called. I did some digging into this problem and found that it seems like the PIC itself is never enabled because inportb/outportb behave erratically. Here is an example. I am trying to enable IRQ 5. So I: IMR = inport(0x21); // read in the current status of enabled interrupts: IMR &= ~(1 << 5); // Clear desired bit (this enables interrupt 5) outportb(0x21, IMR); // Out new IMR value to the PIC. Next I check to see if this new value was written to the PIC: cprintf("0x21 %02X - IMR %02X ",inportb(0x21),IMR); However The value written and the value read do not match. Instead the inported value is 0xF8, while I just outported 0xD8..... So I can never enable interrupts since the PIC doesn't get writtent o properly. Has anyone experienced something similar? Any ideas? Jordar
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |