home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!mcsun!Germany.EU.net!news.netmbx.de!zrz.tu-berlin.de!math.fu-berlin.de!news.th-darmstadt.de!backus.pu.informatik.th-darmstadt.de!wallmann
- From: wallmann@backus.pu.informatik.th-darmstadt.de (Natuerlich!)
- Subject: MFP yet again
- Sender: news@infoserver.th-darmstadt.de (The Usenet-News System)
- Message-ID: <1992Jul27.201854.20396@infoserver.th-darmstadt.de>
- Date: Mon, 27 Jul 1992 20:18:54 GMT
- Nntp-Posting-Host: backus.pu.informatik.th-darmstadt.de
- Organization: MSD software vault #9 @THD
- Lines: 70
-
- I have bothered the net for the last couple of years with
- this problem. But now, since I feel _really_ confident that
- I know what's going on I feel oblidged (oh so oblidged (har))
- to bother you once more.
-
- The problem:
- /* ----------------------------------------------------------
- WARNING!! You have to reboot after running this program
- ---------------------------------------------------------- */
- #include <tos.h>
-
- main()
- {
- unsigned long count = 200000;
-
- Cconws( "Move the mouse, hit the keys!\r\n");
- while( count--)
- {
- Jdisint( 6);
- Jenabint( 6);
- }
- Cconws("Mmmh, either you were lucky or I was wrong :-P\r\n");
- }
- ----------------------------------------------------------------
- Now these are only TOS calls and you wouldn't expect them to
- produce a crash (in an ideal world). Alas they do.
-
- What's happening is that the MFP chip that is accessed here with
- the Jdisint, Jenabint (aside: why not Jdis*b*int ?) has a problem
- dealing with an interrupt JUST WHEN it's being turned off to this
- interrupt source. The Jdisint call in this case is sort of
- asynchronously interrupting the interrupt processing of the MFP
- (maybe just when communicating with the CPU). [#1#]
-
- Now the MFP doesn't know what to tell the CPU properly anymore
- and sends the CPU a spurious interrupt. On the ST though, normally
- a spurious interrupt (which can't be masked, coz it's NMI) leads
- to bombs!
-
- EVERY program that uses Jdisint (or disables/masks off the MFP
- directly) on an interrupt channel which might still produce interrupts
- has a slight chance of crashing.
-
- Solution:
-
- a) Programmers that use Jdisint or turn off -active- MFP
- interrupts in any way, may want to intercept the exception
- vector at $60 and just do an RTE on it.
-
- b) Users who feel that they might suffer from spurious IRQs
- install the little ditty appended here, that just ignores
- spurious IRQs, and put it anywhere in there AUTO folder.
-
- Nat!
- ----------------------------------------------------------------
- table
- !"#$%&'()*+,-./0123456789:;<=>?
- @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
- begin 644 spurious.prg
- M8!H !D $ < $*G/SP ($Y!0_H 'B+X & Az
- MR0!@0E=(> ( /SP ,4Y!6$)204Y33OD'____3G,-"@!3<'5R:6]U<R!)4E$@y
- J4')O=&5C=&]R('8P+C @:6YS=&%L;&5D("AN870A+SDR*0T* x
- w
- end
- ----------------------------------------------------------------
- [#1#] My -model- of what's happening.
- --
- Email: wallmann@backus.pu.informatik.th-darmstadt.de
- "Bang that bit that doesn't bang"
- Waiting for the time when chips are measured in color.
-