Discussion Forum

The length of segment ?STACK

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Li Li
Posted
27-Apr-2004 09:38 GMT
Toolset
C51
New! The length of segment ?STACK
LINK MAP OF MODULE: 6H (DISPBIOS)


TYPE BASE LENGTH RELOCATION SEGMENT NAME
-----------------------------------------------------

IDATA 005DH 0001H UNIT ?STACK


Q:How was the length of segment ?STACK calculated?
Read-Only
Author
V K
Posted
27-Apr-2004 11:04 GMT
Toolset
C51
New! RE: The length of segment ?STACK
The length and of segment stack isn't calculated! It is defined in the STARTUP.A51, like this:

?STACK SEGMENT IDATA
RSEG ?STACK
DS 1

By default L51 locates stack in the end of IDATA memory, and phisical size is
RAMTOP-STACK = 0ffh( or 07fh for 51)- 005DH = 162 (or 34) bytes.
Read-Only
Author
Li Li
Posted
28-Apr-2004 01:53 GMT
Toolset
C51
New! RE: The length of segment ?STACK
Thank you for your reply!

The length of segment ?STACK is incorrect or meaningless in the link map? I don't include the startup.a51 in the project!
In application,I only pay attention to the base of ?STACK ?
Read-Only
Author
erik malund
Posted
28-Apr-2004 13:39 GMT
Toolset
C51
New! RE: The length of segment ?STACK
1) The length of segment ?STACK is incorrect or meaningless in the link map?
2)I don't include the startup.a51 in the project!
3)In application,I only pay attention to the base of ?STACK ?


1) since the linker does not know, it set the length to 1 and anyone who took the time to read the manual know that the stack size is " ?STACK to end of IRAM".
2) fine, if you are not writing in C. If you are why the #&!! are you mucking whith things that are no business of yours.
3) If you use the tools as intended you do not need to "pay attention to the base of ?STACK " SO, instead of using the tools as intended, you have created a mess where you have to do the work the tools are designed to do for you.

Erik

Next Thread | Thread List | Previous Thread Start a Thread | Settings