[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ADTPro beta - now with native IIgs serial support



mdj wrote:
Michael J. Mahon wrote:


Many years ago, I worked with an early IBM 360 with a quite complex
interrupt protocol for (especially) the card reader and the printer.

I found that a simple polling protocol could be used which, if double
buffering was implemented, was faster in a copy loop than all but the
most bizarre interrupt-driven protocol.

Of course, I didn't have to worry about whatever else was going on...
;-)


I agree - interrupt overhead is pretty high, particularly on the Apple
II, and moreso if you're using the ProDOS supplied interface.

In a single tasking environment you might as well just poll, since it's
both computationally more efficient and simpler to implement, for tasks
like this where its more common for there to be data to collect than
not.

If the hardware itself was actually buffered, it might be a different
story - in that case you'd have the possibility of a very efficient
interrupt routine that was called less frequently, and if the hardware
buffer was memory mapped, the interrupt routine itself would be
extremely small.

Exactly.

For example, if the FIFO had a low- and high-water mark for
triggering an interrupt, the overhead could be amortized over
several characters.  Or if DMA were available, then an interrupt
could be used to report a filled buffer, etc.

-michael

New, faster SUDOKU v2.0 solver for Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."