Re: A86: APD


[Prev][Next][Index][Thread]

Re: A86: APD




At 06:13 PM 2/20/98 -0700, you wrote:
>at about $0C29 there is a call to shut down the calculator.  BUT if you do
somethings such as :
>    res 3,(IY+$08)
>    set 4,(IY+$08)
>or vice versa (no emulator on this computer darn) and then call $0C29 it will
>do the APD sequence.  NOTE: there is a call to $0C29 on rom page $0D and that
>is the call you should use.  just search the memory for $CD,$29,$0C on rom
page $0D.
>
or just do:
	res onRunning,(IY+onFlags)
	res onInterrupt,(IY+onFlags)
label:	jr label

That's what the routine at 0C29 does anyway (plus a checksum of an entire
ram page and a bunch of other stuff). But 0C29 is for the timeout shutdown,
when it needs to save the calc state. If you're in an assembly program,
saving the calc state doesn't do anything, so you can just use the code
above (and it will turn off quicker). I'm not quite sure those flags are
right...check the archives for when this came up before...

But about picking it up when it comes back on...
When the calc comes on, it's because you pressed the on button, so it's an
interrupt, it ignores the return address. So the only way to get it to
return to your program, AFAIK, is to use the user on routine. It's just
like the interrupt area, only at a different address, and with a different
flag bit. I believe it's on my web page.

--Joshua

<http://user1.netcarrier.com/~grams/joshua/>


References: