Re: [cc65] Interrupt <-> C runtime environment

From: Greg King <greg.king41verizon.net>
Date: 2011-07-10 04:51:37
From: "marcas"; on Friday, July 08, 2011; at 05:19 PM -0400
>
> I tried to invoke a C function within an interrupt.
> As the cc65 run-time environment does not allow that, my question is:
>
> Which memory addresses must I save, in order to restore the state
> from before the interrupt?

1. You must save the contents of the ZEROPAGE segment (currently, 26
bytes).

2. Interrupts can happen in-between changes to the two bytes of the
Stack-Pointer -- the SP will be "indeterminate".  Therefore, your
interrupt functions must create their own stack.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jul 10 05:53:24 2011

This archive was generated by hypermail 2.1.8 : 2011-07-10 05:53:28 CEST