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

From: Dwight K. Elvey <dwightk.elvey_at_amd.com>
Date: Mon Feb 10 11:58:16 2003

Hi
 There was some software multitasking done on 6502's, as well
as other machines. This was done in Forth ( both preemptive
and various round robin taskers ). Forth has the advantage
that a task state can be saved with just two pointers. You
do need to swap task at word boundaries. This can cause
a little latency if it is a interrupt driven tasker.
( "word" here refers to the minimum executable unit of the Forth
engine and not the address size ).
Dwight


>From: "Patrick Finnegan" <pat_at_purdueriots.com>
>
>On Sat, 8 Feb 2003, Jim Keohane wrote:
>
>> =====excerpt=2======================
>>
>> A 6502 task context
>> would therefore require moving about 1KB, which would take about 4,500
>> instructions (at one instruction per cycle.) On a circa-1980's machine,
>> with a 1MHz clock, that would take about 4.5 msec.
>
>This gives me awfully devious ideas... First, were there any 'multitasking
>machines' designed around the 6502? If you wanted to do multitasking, it
>seems like you could design a fairly simple MMU that would swap out the
>zero-page and stack (or all of the memory pages) for different ones,
>depending on the running task. Leaving only a few registers that need to
>be saved, it would leave a very small overhead for task swapping. You
>could even implement kernel and user mode into the MMU, making it swap
>pages automatically on an interrupt or 'memory write' to signal a syscall
>(and a swapping of pages, interrupt to the CPU and transition to 'kernel
>mode').
>
>I think I'm going to need to start playing with designing a 6502-based
>machine now... Or maybe I should just get back to working on putting
>machines into racks so I have some floorspace around here to work in.
>
>Pat
>--
>Purdue Universtiy ITAP/RCS
>Information Technology at Purdue
>Research Computing and Storage
>http://www-rcd.cc.purdue.edu
Received on Mon Feb 10 2003 - 11:58:16 GMT

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