Article View: comp.sys.amiga.tech
Article #4193Re: Interrupt Servers
From: Valentin Pepelea
Date: Wed, 04 Jul 1990 02:09
Date: Wed, 04 Jul 1990 02:09
41 lines
2229 bytes
2229 bytes
In article <6493@tekig5.PEN.TEK.COM> brianr@tekig5.PEN.TEK.COM (Brian E
Rhodefer) writes:
>
> My copy of the Exec volume of the RKM, in the chapter on Interrupts
> (Ch 7, I believe), says that Interrupt Server routines can't count
> on the contents of A6, and that only regs D0-D1/A1/A5 are scratch.
To be precise, what the RKM says is that the registers d0,d1,a0,a1 are
scratch registers that are automatically saved by the kernel, and so are
registers a5 and a6, because they are often used by servers.
> a) if everyone indeed preserves A6, as the RKMs appear to mandate, then
> they should be able to depend on the Kernel's loading of A6 with SysBase
The kernel pre-saves a6 for you so that *you* may load it with whatever you
want. The a6 register is indeterminate at the beginning.
> b) if nobody depends on A6, as the RKMs suggest, and the kernel
> saves&restores it, then A6 can be regarded as scratch
Correct.
> Is the RKM inaccurate/incomplete here? I don't have to push&pop A6
> in my Server routine, do I?
You don't have to, the kernel does it for you. Just don't make any assumptions
as to the contents of the a6 register when your interrupt server gets
started. (interrupt handlers have ExecBase in a6 though)
The new RKM are accurate and complete, but I suggest you also buy the "Guru's
Guide, Meditation #1 - Interrupts" by Carl Sassenrath, the creator of the
Exec.
>Brian Rhodefer
Valentin
--
The Goddess of democracy? "The tyrants Name: Valentin Pepelea
may distroy a statue, but they cannot Phone: (215) 431-9327
kill a god." UseNet: cbmvax!valentin@uunet.uu.net
- Ancient Chinese Proverb Claimer: I not Commodore spokesman be
Technical Details
Message-ID:
<13037@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!bpa!cbmvax!valentinReferences:
<6493@tekig5.PEN.TEK.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!bpa!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: Interrupt Servers Keywords: A6 scratch Message-ID: <13037@cbmvax.commodore.com> Date: 4 Jul 90 02:09:57 GMT References: <6493@tekig5.PEN.TEK.COM> Reply-To: valentin@cbmvax (Valentin Pepelea) Distribution: na Organization: Commodore, West Chester, PA Lines: 41