[En-Nut-Discussion] Bug in Nut Init?

Ralph Mason ralph.mason at telogis.com
Mon Mar 31 21:15:05 CEST 2003


I noticed a bug in the NutInit function

register volatile u_char * xramend = ((volatile u_char *)0x7FFF);

Doesn't work unless you have some optimisation turned on, because it saves
xramend in a non existent stackframe. (As one should not allocate variables
in naked functions - register or otherwise )

Changing the line to

#define xramend ((volatile u_char *)0x7FFF)

Creates exactly the same code as the above (when it works) but works both
optimised and unoptimised.

Ralph

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.461 / Virus Database: 260 - Release Date: 10/03/2003




More information about the En-Nut-Discussion mailing list