This alpha task switcher demonstrates the point:
members.chello.at/gerhard.kofler/kevin/ti89prog/tskswtch.c.bz2
Compile with GCC 3.3-pre7 or later (because it uses nested functions), and with -Os -std=gnu99 (the latter is necessary, because I use C99/C++ for loop syntax). Ignore the warnings, there is no reasonable way to get rid of them.
(Sorry, no binaries, in order to keep inexperienced users from crashing their calculators with this.
Syntax: tskswtch("prog1","prog2") (you can try to run more than 2 programs, but the required memory will quickly become too much).
To switch tasks, press [ON]. If it doesn't react, try again. (This has to be because AMS is not reentrant, so I can't safely preempt it. Therefore, [ON] presses are ignored if code in FlashROM is running.)
I have successfully run Backgammon and TI-Mahjongg simultaneously on VTI using this.
License and disclaimer:
DO NOT DISTRIBUTE THIS DEMO WITHOUT MY PERMISSION.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
WARNING: THIS IS A DEMO, IT DOES _NO_ ERROR CHECKING WHATSOEVER! IT _WILL_ CRASH YOUR CALCULATOR! USE THIS AT YOUR OWN RISK!!!
If you want to do something more useful with this source code, please ask me for permission before. I will probably say "yes", but I want to be aware of any use of that code.
