Re: mmu for 65c02

From: Gábor Lénárt (lgb_at_lgb.hu)
Date: 2005-04-21 18:03:49

On Thu, Apr 21, 2005 at 05:15:18PM +0200, Ullrich von Bassewitz wrote:
> cc65 considers the zero page locations it uses as "registers", so if they're
> shared between the threads, they have to be saved. If the output file format
> is relocatable (.o65), the zero page registers are relocatable as well, and
> the operating system could assign different locations to all running threads.
> This removes the need to save these pseudo registers in a context switch.

Yes, but one of the good thing about read-only code segments is that it's
shared between threads of the same process. If you have a program with code
segment size of eg 33K it is even does not fit multiple times into the
memory of a C64 for example ... So this is not an option for me :(
Relocation is done ONCE while program is loaded eg from disk to the memory.
Then any created child uses the same code from the memory, so you can't
relocate references of zero page again ...

However, if _ALL_ the zero page is considered as registers for cc65 we could
have private zero page (like stack page) for each thread ... It can be used
for cc65 pseudo registers for example but also can hold information about
the thread itself (TLS: Thread Local Storage, afaik).

- Gábor


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.