The 8259 interrupt controller (HELP!)

Bob Argyle rargyle at wsccs.UUCP
Sun May 15 09:07:03 AEST 1988



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 



More information about the Comp.lang.c mailing list