Designing around a 6502 (was Re: Assembly on a Apple IIc+)

From: Hans Franke <Hans.Franke_at_mch20.sbs.de>
Date: Tue Feb 11 06:51:00 2003

> > There was some software multitasking done on 6502's, as well
> > as other machines. This was done in Forth ( both preemptive

> Yes, I figured that much, but I meant some sort of hardware multitasking,
> with an MMU like Sun did on MC68k systems. Are there any 6502-based
> machines that used an MMU for hardware-based multitasking?

Why? You don't need to have a MMU for multi tasking.
MMUs are ment for virtual addressing which is a
complete different concept. Of course, it _may_
be halpfull if a multitasking system also offers
virtual addressing, but at least for some applications
it may even degrade performance.

Multitasking means just beeing able to perform several
(more or less) independant tasks at teh same time.
Basicly you'll have two different methods, cooperative
or preemptive. Cooperative means the tasks have to give
up at certain points and let others take over. Windows
and MacOS are good examples for that. A preemptive
system needs a source to interrupt the actual running
task (uaualy something liek a timer interrupt), and a
way to store the CPU context. everything else is based
on the 'operating system' conventions.

The smallest preemptive system I've ever seen on the
6502 was published in one of the early MICROs. It took
8 bytes of ZP RAM to run 7 tasks. Context switching
was done via the stack, where every task got his own
area. IAll you needed was a timer interrupt. It was
originaly written for the KIM, but easy to adapt for
any 6502 sytem. I did get it working on the Apple II.
BASIC/DOS 3.3 as one task, the Monitor as second task
(with a little change to work via serial line), so I
could debug a programm live.

Gruss
H.


--
VCF Europa 4.0 am 03./04. Mai 2003 in Muenchen
http://www.vcfe.org/
Received on Tue Feb 11 2003 - 06:51:00 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:54 BST