🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11318

Re: Help writing a vblank server in assembly

#11318
From: Randell Jesup
Date: Fri, 03 Feb 1989 00:18
33 lines
2181 bytes
In article <10569@well.UUCP> ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
>In article <5854@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes:
>>	Oh, when writing vblank routines, currently you must not assume the
>>value of a0 on entry, but MUST set a0 == _custom on exit!
>>				^^^^^^^^^^^^^^^^^^^^^^^^^
>	When did this become true?  Is this required for handlers, servers,
>or both?

	Only for graphics vblank servers, and it became true in 1.0, I think.

>	I have a VBlank server in "Onion" that sets D0 to 0 on exit, and it's
>worked great (so far).

	D0=0, fine.  It's A0 I was referring to.  This is all caused by a
bug in the graphics vblank server - it assumes A0 = _custom, and (sometimes)
wipes A0 before exit.  Handlers are allowed to assume things like a0 ==
_custom, as specified in exec, but servers aren't.

	A quote from Carl Sassenrath's new book, "Guru's Guide to the Commodore
Amiga: Meditation #1 - Interrupts"  (a must buy for anyone doing Amiga
programming!): "there is also a problem that can occur when adding a
server to the VERTB chain at a priority higher than 9.  The graphics library
interrupt server (at priority 10) incorrectly assumes that the A0 register
contains a pointer to the custom chips.  If your server runs at higher priority,
it will need to exit with the correct value in A0."

	There's a small ad in the back of some AmigaWorld issues for it.
It's published by Sassenrath Research, PO Box 1510, Ukiah, CA  95482.  I don't
remember the price, and it runs about 100 (information and example packed)
pages.  Can you tell I like it?  (and I have access to the source)  :-)

-- 
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID: <5886@cbmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!cbmvax!jesup
References: <3777@crash.cts.com> <5854@cbmvax.UUCP> <10569@well.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!cbmvax!jesup
From: jesup@cbmvax.UUCP (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Help writing a vblank server in assembly
Message-ID: <5886@cbmvax.UUCP>
Date: 3 Feb 89 00:18:33 GMT
References: <3777@crash.cts.com> <5854@cbmvax.UUCP> <10569@well.UUCP>
Reply-To: jesup@cbmvax.UUCP (Randell Jesup)
Organization: Commodore Technology, West Chester, PA
Lines: 33