cancel
Showing results for 
Search instead for 
Did you mean: 

Fill Stack with watermarks without reset handler

LHans.2
Associate II

Hello,

I need to fill the stack with watermarks, but I do not have access to the assembly startup script. Usually I would do it right at the start of the reset handler, is there another way of doing this?

4 REPLIES 4

It's OK to do it at the start of main(), best in asm, inline, or calling a function in separate asm source.

As you never return from main(), all stack consumed - for whatever reason - at entry to main(), remains consumed forever.

JW

LHans.2
Associate II

Main will have to do for now. For everyone doing this, try not to overwrite stuff that is already on the stack when main is beeing called.

"I do not have access to the assembly startup script."

Could you say why not?

If you can call another function, or pull the SP register (perhaps via a pointer to an auto/local variable) you can move downward from there.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..