| delorie.com/archives/browse.cgi | search |
| Xref: | news-dnh.mv.net comp.os.msdos.djgpp:3497 |
| Path: | news-dnh.mv.net!mv!news.sprintlink.net!news.uoregon.edu!newsfeed.internetmci.com!in2.uu.net!nntp.crl.com!crl.crl.com!not-for-mail |
| From: | src AT crl DOT com (James R Cantrell) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Assigning interrupt procedures in djgpp. |
| Date: | 28 Nov 1995 21:11:03 -0800 |
| Organization: | CRL Network Services (415) 705-6060 [Login: guest] |
| Lines: | 49 |
| Nntp-Posting-Host: | crl.com |
| To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Dj-Gateway: | from newsgroup comp.os.msdos.djgpp |
I am trying to transfer my serial port class from Borland C++ to
djgpp. My major stumbling block is figuring out how to assign the
interrupts. Can someone help me? I'll send anybody who wants to help
the source code if it's needed...
Can anyone tell me what the djgpp equivalents are for the following
statements in Borland C++?
-------------------- Source Fragment Starts Here ---------
class UARTio
{
// ... stuff omitted
public:
// ... stuff omitted
void interrupt far (*oldAction)(...);
static void interrupt far serialAction(...);
// ... stuff omitted
};
void UARTio::installInterrupt()
{
// ... stuff omitted
if (getvect(irq + 8) != serialAction)
{
oldAction = getvect(irq + 8); // Save the old interrupt
disable(); // Disable the interrupts
setvect(irq + 8, serialAction);// Install the class's interrupt
enable(); // Enable the interrupts
}
// ... stuff omitted
}
void interrupt far UARTio::serialAction()
{
if (!UARTioClass->isModem)
{
UARTioClass->selfAction(); // Use the serial-link actions
}
else
{
UARTioClass->modemAction(); // Use the modem actions
}
sendEOI(); // send End of Interrupt signal
}
----------------------- Source Fragment Ends Here ------------------
Thanks,
Shane Cantrell
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |