Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!quads.uchicago.edu!tmm3 From: tmm3@quads.uchicago.edu (todd matthew morin) Newsgroups: comp.sys.mac.programmer Subject: VIA woes! Summary: Problems with VIA from one machine to another Keywords: VIA, millitimer Message-ID: <1991Mar4.221427.11334@midway.uchicago.edu> Date: 4 Mar 91 22:14:27 GMT Sender: tmm3@midway.uchicago.edu Distribution: na Organization: University of Chicago Lines: 27 Hello, I've inherited an assembly language routine that was written a few years ago and writes directly to the mac VIA to enable millisecond accurate timing. Unfortunately, this code predates all but the MacPlus and SE (and the 512K, etc). The problem is that on newer machines, most notably the SE/30, unexpected crashes occur as a result of this code. Using MacsBug I've been able to figure that the program is crashing on an RTS instruction. The program itself (in which this timer is included), displays files on the screen synchronously with the vertical interrupt, then starts the timer. The SE/30 does not consistently crash at the same file being displayed, but only consistently on the RTS instruction. This leads me to believe that the SE/30 is doing something with VIA1 during the millitimer routine. I have a copy of the new mac hardware reference (Guide to the Macintosh Family Hard- ware, 2nd edition), and have gone through the excellent section on the VIAs, but since no sound is being played, no disk access is occurring, etc., I am at a loss to understand exactly what is happening. Anyone have any ideas. The source code is available upon request for those who think it'll help figure this out. This code BTW was modified for MPW by David Powell of NIH in 1986, and originally written under MDS by Scott Gillespie of Reed College, and has been floating around for at least 4 years...so many of you may have already seen it. Anyway, I'd appreciate any ideas any of you might have. If you need a copy of the source code to help, drop me a line. Finally, please e-mail responses and I will definately post a summary. Thanks, Todd M. Morin tmm3@midway.uchicago.edu