Thanks Arnd-Hendrik,

using something like this:
--------------------------------------
NAKED(_reset_vector__){
  extern int __stack;
  
  // Initialize the stack pointer
  // N.B. Don't forget to add the compiler option "-mno-stack-init"
  __asm__ __volatile__("mov %0, r1"::"g" (&__stack));
  ...
}
--------------------------------------

give me the correct assembler code:
--------------------------------------
00002500 <_reset_vector__>:
    2500:       31 40 00 25     mov     #9472,  r1      ;#0x2500
--------------------------------------

Do you think that it is correct to do something like this???
It seems to work for me!

Thanks,
Fred

-------------------------------

Frederic Beaulieu, M.Sc.

Research and Development

NewTrax Technologies Inc.

http://www.newtraxtech.com/
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 4/18/2005
 


Reply via email to