Path: utzoo!attcan!uunet!cbmvax!rutgers!mailrus!cornell!batcomputer!braner
From: braner@batcomputer.tn.cornell.edu (Moshe Braner)
Newsgroups: comp.sys.atari.st
Subject: Re: Register saving for BIOS traps?
Summary: Save D1-D2/A0-A2 (conservative)
Message-ID: <6393@batcomputer.tn.cornell.edu>
Date: 23 Sep 88 19:23:47 GMT
References: <19880922163903.5.JRD@MOA.SCRC.Symbolics.COM>
Reply-To: braner@tcgould.tn.cornell.edu (Moshe Braner)
Organization: Cornell Theory Center, Cornell University, Ithaca NY
Lines: 14

[]

It is all written in the Abacus "ST Internals" (and other places).
I don't have it in front of me now, but more or less:  (X)BIOS
trap routines return their result in D0, and may also mess up
D1, A0 and A1.  In some rare case I sort of remember D2 or A2 being
affected.  Thus, if you save D1, D2, A0, A1 and A2 before a BIOS
trap, and restore them later, you're quite safe.  If you write
an interrupt handler you do the opposite: save D2-D7/A1-A6 at the
start and restore before returning.

- Moshe Braner

1*T800 == 3*68881