??? 03/04/10 14:05 Read: times |
#173842 - but you do Responding to: ???'s previous message |
I consider harmful even the "all not explicitly initialised global/static variables are zeroed upon startup". This is a C-specific thing.
naah, I do that when I do assembler as well I hate when machines try to do "smart" things for me. I want to have control. but you do, if you really (I do not see why) want a 'limited' clearing of RAM, you are free to do so by modifying startup.a51 (You will love to do so it is in ASSEMBLER :) ) thus YOU HAVE CONTROL Oh, I see. And I see how THAT can constitue a potential source of error, too. ANY code, if wrong is "a potential source of error"YOU HAVE CONTROL So, if I don't enter the correct value (wherever it could be entered), or I enter an incorrect value (e.g. stating less XRAM than actually used by the program), and I run the simulator, are the XRAM bytes zeroed? if the "the INcorrect value" is too big, yes, if too small, not all, just the amount you state YOU HAVE CONTROL . FYI I have some cases where a switch to boot by a software inducd reset require a few RAM values to be preserved and that is very simple to do YOU HAVE CONTROL I do not know of ANY place in (Keil) C where you do not "have control", if you do not "have control" it will not be the compiler, it will be your lack of knowledge of how to use it. Erik |