Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!hellgate.utah.edu!helios.ee.lbl.gov!ux5.lbl.gov!beard From: beard@ux5.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Re: "Spurious Interrupt..." Problem Message-ID: <6293@helios.ee.lbl.gov> X-Local-Date: 27 Jul 90 02:23:24 PDT Date: 27 Jul 90 09:23:24 GMT References: <23389@dartvax.Dartmouth.EDU> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux5.lbl.gov (Patrick C Beard) Organization: Berkeley Systems, Inc. Lines: 31 In article <23389@dartvax.Dartmouth.EDU> sean@eleazar.dartmouth.edu (Sean P. Nolan) writes: #Hi there... # #I'm working on a project that uses a VBL task. The task is locked in the #System Heap and VInstall'ed at INIT time. It is pretty benign, doing some #floating-point calculations and then dropping out. It restores all its #registers, and doesn't use any nasty memory-moving calls. (The Floating- #Point calls are via the _FP68K trap). # #The task runs without a hitch on my SE running 6.0.5 system software. #However, when I tried it on my girlfriend's SE/30 running 6.0.5, I ran into #trouble. It works ok (and calculates its values appropriately) for a short #while, usually about 4-5 minutes. Then, I drop into the debugger with a #"Spurious Interrupt or Unimplemented Interrupt Vector" message (equivalent #to System Error 11). This does NOT happen within my code, it happens always #within Dequeue or Date2Secs, and always during an FMOVE op. Here is the problem: SE's have no FPU, SE/30's have an FPU. The problem is that SANE (FP68k) doesn't save the FPU's state and so you have to do it before using SANE at interrupt time. The Sound Manager uses SANE at interrupt time when processing bufferCmd's, and it as well gets these types of crashes. I have seen these many times before. The solution to your problem is to do an FSAVE -(SP) on entry to your routine, and FRESTORE (SP)+ before you exit, on machines that have FPU's. -- ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------