This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RAM Space

I could not find an explanation for an observation given below.

1)When I declared bits like
bit AM,fg_chat,pumpoff=0;pumpon=0,mode=0;
bit PMP_flag = 1,buzzer=0,pumpon_flag=0;
bit xmitempty,flash1,response_received=0,response_delayed=0,sms_flag;
bit oht_red,oht_rg,glr_red,glr_rg;

my program data size was 74.3 bytes and code size 2179(there are many other variables also)
but when I declared like
bit AM,fg_chat,pumpoff=0;pumpon=0,mode=0, PMP_flag = 1,buzzer=0,pumpon_flag=0, xmitempty,flash1,response_received=0,response_delayed=0,sms_flag, oht_red,oht_rg,glr_red,glr_rg;
the data size increased to 96.7 bytes and code size 2387.
I use 89S52 uC.

Why this happens? What is difference between these?

Parents
  • Let me ask one more doubt
    I use serial communication and T0 interrupt . I write the functions as below

    void Scc0InterruptHandler() interrupt SIO_VECTOR using 1 { }

    int0Delay() interrupt TF0_VECTOR using 2 { }

    But while debugging, it is noted that the first ISR is using register bank 1 but the second ISR using register bank 0 even though it has to use 2 as per the program. Kindly comment.

Reply
  • Let me ask one more doubt
    I use serial communication and T0 interrupt . I write the functions as below

    void Scc0InterruptHandler() interrupt SIO_VECTOR using 1 { }

    int0Delay() interrupt TF0_VECTOR using 2 { }

    But while debugging, it is noted that the first ISR is using register bank 1 but the second ISR using register bank 0 even though it has to use 2 as per the program. Kindly comment.

Children
No data