Re: [cc65] Interrupt handlers in C as part of the C library ?

From: Greg King <greg.king41verizon.net>
Date: 2012-01-17 22:07:37
From: "Oliver Schmidt"; Tuesday, Jan. 17, 2012 10:29 AM; at -0500
>
> The wrapper would save/restore the zero-page memory area, save/restore
> the sp., and switch to a new sp.  It would call exactly one C
> function.  Trying to use the registration function twice without prior
> unregistration just would fail.  The base addr. and size for the
> interrupt stack could be additional args. to the registration
> function.

Why would there need to be unregistration?

There would be two functions:
The first one would set up the interrupt environment.  It could be
called by the C code; but, a better idea is a constructor that uses
private segments or memory areas and a size-variable that's set at
link-time.
The second one would be used to point to the C interrupt function.
Calling it again simply would replace the old pointer with a new one.

If it is implemented, then funcref will need another field:
Interrupt-safe: yes/no.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jan 17 23:08:21 2012

This archive was generated by hypermail 2.1.8 : 2012-01-17 23:08:24 CET