<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 30 Mar 1993 10:00:09 +0100 (BST)
From   : "I Stephenson" <ian@...>
Subject: Re: Relocation of 6502 images

>Is relocation really that difficult? You'd only have to relocate to the
>nearest page boundary, and you should be able to deduce the relocation
>purely from the instruction context in programs written in a neat style.

It's not realy that difficult if you build it into the assembler. It would 
then produce some sort of object file format which contains a list of 
bytes (roughly the top end of two byte parameters) which must have the
programs start address added to them. The loader could then do these corrections
(AMPLE does this when it loades modules).

It could be hacked into as65, but I'm currently just usng the Basic assembler.

>eg. (my 6502 is a little rusty - forgive me...)
>
>LDA (&2a00),Y
Thats an invalid instruction (I forgive you :-)).


>I think the benifits of relocation (stacking executables and, who knows,
>maybe even lightweight threads(!)) outweigh the disadvantages.
>
>If you're really against relocation, you could use SRAM to page programs
>into memory.... At worst, copy the image into a memory cache rather than
>writing to disk.......
I'm currently paging to disc (it ALMOST [ie sometimes :-)]works!). It's 
slow, but not imposably slow (kinda remanisent of VMS). This gives most 
of the advantages of relocation (stackable executables [just about working] 
- prehaps even processes, though the context switch would be too heavy
right now), plus every program gets about 60K of memory to use (if it needs
it - I only page out whats actually been claimed).

I agree that paging to sideways RAM would be a vast improvement. This 
would reduce the context switch time dramatically. However at the moment 
I don't have a set of routines to do that (I've got ome RAM disc stuff, 
but that seems to have some bugs, and in anycase switching fime systems 
is a real bitch). Changing the paging to read from RAM should be pretty
easy - I hope to have something releasabe in a week or so, and then prehaps
someone can find the relevant code to slot in.


Ian

>Just my 10 centime's worth...
>
>  ,--,             Chris StJohn, LIX, Ecole Polytechnique, 91128
> /    /_  __' _    Palaiseau, Cedex, FRANCE. (+33) 1.69.33.45.93
>(____/ (_/ (_/_).
>---------------    "Just because you're paranoid
>                   Don't mean they're not after you" -- Nirvana

<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>