From: Shawn Jefferson (shawnjefferson_at_24fightingchickens.com)
Date: 2003-10-28 20:33:53
On Tue, 28 Oct 2003 19:15:08 +0100, you wrote:
>The current implementation of the heap assumes that the stack is located at
>the end of the BSS segment. The heap is located at the bottom of the stack and
>will grow downwards. There has been a discussion about changing this some
>months ago, but a flexible solution requires expressions in the linker
>scripts, so it has been postponed.
Ok. If I move the BSS segment, on the Atari platform my stack and BSS
segment do not any longer occupy the same memory space. The stack is
still at the "end" of usable RAM, while the BSS segment could be
anywhere.
__heapend:
.word __BSS_RUN__+__BSS_SIZE__
initheap:
sec
lda sp
sbc #<__STACKSIZE__
sta __heapend
lda sp+1
sbc #>__STACKSIZE__
sta __heapend+1
rts
So, the heapend is calculated from the BSS segment, and aren't you
then subtracting the size of the stack from that value in the initheap
routine? (maybe I'm misunderstanding it)
So it seems again that if I move my BSS segment (on the atari) my
stack isn't in my BSS segment, but the heapend still gets changed
assuming that the stack is there, right/wrong?
Sorry to be so thick on this, just want to make it clear in my head
how the memory is layed out on the Atari platform.
--
Shawn Jefferson
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-10-28 20:37:11 CET