I've been experimenting with EEVars. I downloaded the program using Microcode Studio with the ICD. I enabled debug and let the program step into EE_Vars.Pbp. I watched the EEProm values get set with 511 as the EE_start. All my EE variables were set to default values and everything was fine. After everything was complete and my last variable was done EE_start has the value '17h' in it. So I stopped the program. Unplugged my power to my processor. Plugged it back in and restarted the ICD without downloading the program again. I paused at the first line:

goto OverEEsubs ; Skip over subroutines

I then changed the value of my first EE_var from 'FFh' to 'A4h' and started single stepping again. I am expecting that the 'First Run' had set all values to default and now the values would be read into my variables but no longer set to defaults on power up.

Instead the EE_start value is set to zero, followed by my first EE_var at location EE_start + 1 is reset to 'FFh' and the whole process starts over again. Am I misunderstanding something about how EEVars works? Here is an example of how I define my first variable. All others are the same.

EEStat VAR BYTE:@ EE_var _EEStat, BYTE, 255

How does EEVars know not to set default values on subsequent power ups? Maybe this would give me some insight. I assumed it looks at EE_start to see if it is not equal to 255 or 0.

Thanks, Bob