Path: utzoo!attcan!uunet!cbmvax!steveb From: steveb@cbmvax.UUCP (Steve Beats) Newsgroups: comp.sys.amiga Subject: Re: VBlank interrupt servers Message-ID: <4703@cbmvax.UUCP> Date: 12 Sep 88 13:59:40 GMT References: <880911141731.00s@Janus.MRC.AdhocNet.CA> Reply-To: steveb@cbmvax.UUCP (Steve Beats) Organization: Commodore Technology, West Chester, PA Lines: 42 In article <880911141731.00s@Janus.MRC.AdhocNet.CA> svermeulen%Janus.MRC.AdhocNet.CA@UNCAEDU.BITNET (Steve Vermeulen) writes: > >.............. I needed an exact, stable, time base that would track >across 9 Amigas for an extended period of time without drifting >between machines. To do this I am proposing to use the VBLANK signal >and essentially keep a count of all the VBLANKS that occur. > >remembering the DevCON notes I looked at Steve Beats article on using >68K assembler on the Amiga. In which Steve creates a VBLANK server >that counts vblank events and Signals another task every 60 vblanks. > >Comparing his article to the Exec RKM on page 60 where it states: > > "Servers have different register values passed than handlers do. > A server cannot count on the D0, D1, or A6 registers containing > any useful information." > >This has caused me some head scratching, as Steve's interrupt server >USES A6 under the assumption it has a valid value of ExecBase in it >when it is called. You see, I started with the example on pages 61-62 >of RKM Exec and then added in the "jsr _LVOSignal(a6)" call and things >went nuts. I finally traced it down to this: when my server (at priority >of -60) is called A6 is trashed (as the RKM states) but Steve's >server is added at priority +20 and this must put it high enough in the >list (probably at the head) that A6 still contains a valid pointer >to ExecBase. > >Second Question: What I want to know is "AM I BRAIN DAMAGED, or is this the >correct explaination"??? > Er, cough, ahem ... You spotted the intentional mistake then ? Sorry, that was a real, honest-to-goodness cock up on my part. It did work though, which is probably why I missed it. I've been looking through these manuals so long now that I often make assumptions on how something will work (based on the way other routines in the same sub-system are called). In most cases this is OK, but obviously not in all of 'em. So don't worry, your brain appears undamaged and functional. Steve