apratt@atari.UUCP (Allan Pratt) (04/30/88)
From article <4650@watdcsu.waterloo.edu>,
by magore@watdcsu.waterloo.edu (Mike Gore, Institute Computer Research - ICR):
> [ ... The only trouble would be ... ] interrupt overhead.
Well, interrupt overhead will cost you PLENTY, buster. Just having the
hblank interrupt vectored to RTE costs about 18% of the CPU, last time we
tried it.
On a monochrome system, you get 400 lines * 50Hz = 20 KHz (20 Kilo
hblanks/sec); the exception takes 44 cycles, RTE takes 20, so that's (66
cycles per hblank) times 20 KHz = 1,320,000 cycles/sec in overhead;
that's 12% of the CPU mathematically -- there are lost cycles when the
CPU can't get the bus (during video fetch and refresh), and other
vagaries... People here computed (years ago) that you lose more like
22% of the CPU with an RTE in Hblank.
And now you want to do WORK during hblank? Count those cycles!
============================================
Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else. ...ames!atari!apratt