Xref: utzoo comp.sys.atari.st:37912 comp.sys.atari.st.tech:2269 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ames!uhccux!munnari.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech Subject: Re: Help with timerA [disassembling play.prg] Keywords: digitzed samples Message-ID: <1180@uqcspe.cs.uq.oz.au> Date: 6 May 91 04:03:34 GMT References: <1147@uqcspe.cs.uq.oz.au> <1991May3.173853.15078@wam.umd.edu> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Followup-To: comp.sys.atari.st Lines: 32 I wrote: >>Check out what TimerB, C and D do, check Internals (though from memory >>there was a bug in that part :-( ), or grab play.arc from atari.archive >>and look for the interrupt code that writes to the Yamaha chip. I'd like to appologise to Dave for seeming to suggest anyone use his code. I meant only to indicate a place to see interrupt code. I was talking about the couple of lines of hand waving the systems requires - you have to reset interrupt pending flags or something. The last thing I would suggest is for someone to grab Dave's code verbatim - or grab anyone's. Nobody learns anything by just copying code. Now, to write a Timer A interrupt: Use the XBIOS function Xbtimer to set the vector to your handler. Your handler should: 1. Save and restore ANY registers it uses. 2. Before you exit, clear bit 5 of $fffffa0f, the Interrupt in-service bit for timer A. 3. Exit using RTE That, I think, is the bare essentials. Dave would nodoubt do exactly that. So would any other program used Timer A. Warwick. -- _-_|\ warwick@cs.uq.oz.au / * <-- Computer Science Department, \_.-._/ University of Queensland, v Brisbane, AUSTRALIA.