wieczor napisał/a:Of course with 8-bit Atari we cannot think about real multitasking - within programs started concurently only one would be active and running. But other programs can remain in memory frozen at current state and stored in extended memory.
Not only thinking about it, but coding it. Simple (!) task-switching was the original plan (frozen background applications), then cooperative multitasking, and finally I opted to go for pre-emptive. Tebe has (it turns out) already described the approximate process elsewhere on this forum, some seven or eight years ago. It's perfectly possible to get the context-switching overhead down to a manageable level, at 50/60 times per second.
That's not to assert that several CPU intensive applications can appear to run simultaneously at full speed on the 6502. No-one would expect that. The fact is that most GUI applications are typically waiting for messages, and thus "not ready". Such processes would receive no CPU time until there's something in their queue. Most of the time, the user experience would still be similar to simple task-switching, although much more flexible than that.
When you're switching between programs they are becoming active and taking place in basic memory while program becoming unactive is stored in extended memory.
This copying of program code from extended to main memory would probably work fine for a task-switcher, but not for pre-emptive or even cooperative multitasking. The GUI will switch context simply by switching banks, and copying small segments of the stack and page zero.
At such approach any amount of memory can be useable - problem with graphics environments for 8-bit computers is limited amount of memory.
Of course if you have a HDD that can be solved also by swapping memory blocks to hard drive .
Certainly more RAM = more concurrent processes, but with the envisaged average GUI application size being 10-25KB, I still struggle to imagine how 256 16KB banks could be filled. Even if every application used 64KB for code plus data, that's still 16 large applications running at the same time on a 1MB machine. :) Of course there are DOS overheads too, if I still decide to sit the system on top of DOS.
But - 640KB seemed like more than enough PC RAM in the 80s, so I have no special objections to the idea. :)