Xref: utzoo comp.sys.ibm.pc:15710 comp.lang.c:10214 Path: utzoo!attcan!uunet!lll-winken!lll-tis!oodis01!uplherc!sp7040!obie!wsccs!rargyle From: rargyle@wsccs.UUCP (Bob Argyle) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: The 8259 interrupt controller (HELP!) Keywords: interrupt, C Message-ID: <531@wsccs.UUCP> Date: 14 May 88 23:07:03 GMT Lines: 24 Using Microsoft C, for a PCclone, I want to program the 8259 interrupt controller (ports 0x20 and 0x21) so that COM1 generates an interrupt (Int 0x0C) when the receive buffer is full. When setting up the interrupt mask, I want to read the previous mask so I can leave it in the same state when the application is done. The data sheets I have on the 8259 does not even say which of the internal registers are at which address. Have any of you gurus or grues (I'll take all the help I can get from any source!) had some experience programming this chip or equivalents? Can it be done in an _extremely_ portable manner, i.e. is there now a BIOS call? The interrupt handler for 0x0C will be writing to the C program's data space into a circular queue and so it would be simplest if it were also written in C for compiling at the same time. Any pointers on this? How do I put in a return-from-interrupt in C? If necessary I can program it in assembly. I would rather develop it in C and then rewrite just the final belled-and-whistled code in assembly once the entire package works, however slowly. ("A program not written yet takes longer to run than a slow program.") Bob Argyle @ wsccs