Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rtp47.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!whuxl!whuxlm!akgua!mcnc!rti-sel!rtp47!owen From: owen@rtp47.UUCP (Karl M. Owen) Newsgroups: net.micro.apple Subject: Re: Interupts on a apple ][+ Message-ID: <243@rtp47.UUCP> Date: Tue, 5-Nov-85 10:05:12 EST Article-I.D.: rtp47.243 Posted: Tue Nov 5 10:05:12 1985 Date-Received: Thu, 7-Nov-85 05:58:49 EST Distribution: net Organization: Data General, RTP, NC Lines: 28 >> [...] have come to the conclusion that the areg is not preserved >> for the interupt code. Specifically when I get an interupt the areg is >> always an 8 or 18 hex. This makes it very difficult to return to the >> interupted code with the regs restored. >> >> [Ted Medin] > > NO REGISTERS ARE SAVED FOR YOU!!! Yes, you must > save all of the registers yourself and restore them after the "rti" > (return from interrupt) command. > > [Tom Levin] Just a little bit more info (with the caveat that I'm working from memory): When you take an interrupt, the X and Y regs are preserved, and the A reg is stored at (I believe) $45. What I generally do is immediately grab the A reg from $45 and push it, followed by X and Y. As I recall, the pc and status word are already on the stack when your interrupt handler takes over. If you need more detailed info (like what order the hi & lo pc and status word are in), mail me or post and I'll look it up. Hope it helps, Karl -- Karl M. Owen Data General, RTP, NC ...!seismo!mcnc!rti-sel!rtp47!owen