Well, I created a nice heap of EPROMS for the eraser in the attempt!

I've ended-up with a reasonably satisfactory result - the analyser tells me my 
stack is at the top of memory (17FFF), which is what I wanted. This means 
I've got 64K of stack, which seems a bit excessive; but what the hell. My 
data area begins at 08000 physical and logical, and my static variables seem 
to go there, so I've got 32K of static variable space to play with too. 
There's potential for the stack to overwrite the static variable space, but 
I'll have made a most dreadful ballsup if that should ever occur!

The key to this seemed/seems to be the BBR (Bank Base Register), which set to 
0x08 seems to give the result described above. I've left everything else at 
their reset values.

It's not exactly what I wanted... I would have liked _DATA to start at 0 
(logical), 08000 physical and the program code to execute from 0 (logical and 
physical), with the stack at 17FFF pushing down; but this might not be 
reasonable. It seems to be a reasonable restriction that the addressable 
(static) data be in the same logical address space as the code; but I don't 
know really.

I must confess, I don't really understand what I've done; but it does work.

I would be happy to have any further light shed upon this...?

On Thursday 04 September 2008 23:29:11 Peter Townson wrote:
> Richard,
>
> Glad to hear that you solved your problem.
>
> I was literally composing a response for you when your message arrived a
> few minutes ago - good timing.  (I'm no expert but no one else seemed to
> be jumping in so I was going to have a go based on faded memories of a
> much earlier project :->)
>
> Cheers,
>
> PeterT
>

-- 
Richard.
PGP Key-id: 0x5AB3D350

Math is like love -- a simple idea but it can get complicated.
                -- R. Drabek

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to