Create a simple project, use 8051 chip;
input a simple program
void main(void) //1 { //2 char a,b; //3 a=-1; //4 b=a/2; //5 while(1); //6 }
build and debug step by step Open watch window,notice local variable when it executed at the 6th line. varvariable b should be 0. but you will see arvariable b is -1 in the watch window