Re: [cc65] Zero page, C stack, and interrupts

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-04-25 20:44:10
Hi,

> If you go for cooperative multitasking, things are easier, but you still need
> to save zero page locations used by a program and setting up separate stacks.

A not very clean but nevertheless functional cooperative multitasking
implementation for cc65 C programs:

http://contiki.cvs.sourceforge.net/viewvc/contiki/contiki-2.x/cpu/6502/sys/mtarch.h
http://contiki.cvs.sourceforge.net/viewvc/contiki/contiki-2.x/cpu/6502/sys/mtarch.c
http://contiki.cvs.sourceforge.net/viewvc/contiki/contiki-2.x/cpu/6502/sys/mtarch-asm.S

An example using it:

http://contiki.cvs.sourceforge.net/viewvc/contiki/contiki-2.x/examples/multi-threading/multi-threading.c

Regards,
Oliver
----------------------------------------------------------------------
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 Apr 25 20:44:14 2010

This archive was generated by hypermail 2.1.8 : 2010-04-25 20:44:17 CEST