cancel
Showing results for 
Search instead for 
Did you mean: 

St10 User stack

Posted on October 31, 2007 at 09:48

St10 User stack

2 REPLIES 2
Posted on October 31, 2007 at 05:44

Hi all,

I have a question about ST10 user stack.

In my linker file, I located it at 0xF0100, size 0x2000; so from 0xF0100 to 0xF20FF

In my startup file, I can see the user stack init :

MOV R0,#DPP2:?C_USERSTKTOP

... but since R0 is a 16 bit register, the value may be truncated... When I run the simulator, after this MOV instruction, the updated R0 value is 0xA100... My target works fine but I can't understand this 0xA100 value.

Could you explain me ?

Thanks a lot !

Pierre

PS : I am using a ST10F276

[ This message was edited by: pierre.roth on 31-10-2007 10:20 ]

Posted on October 31, 2007 at 09:48

OK I found an explanation about DPP registers.

User stack is located in NEAR memory which is accessed using DDP2.

Therefore I think my R0 value is understandable :

Stack located from 0xF0100 to 0xF20FF.

R0 Value :

Hex : A 1 0 0

Bin : 1010 0001 0000 0000

so DPP is 10 (bit 15-14) which is DDP2.

DPP2 contains 0x3C and 0x3C * 4 = 0xF0 !!