xpress_embedo
Advanced Member level 4
I am using XC8 Compiler with PIC18F4550, i want to know some basic questions how compiler actually works when we declare a variable.
When i compile the program:-
My Memory Usage is this.
when i use the following code
My Memory Usage is:-
Why 4 Bytes increased in Program ROM and 2 Bytes in RAM.
2Bytes can be increase in RAM but why 4 Bytes in ROM, Please explain me this.
When using the following Code, Storing value in ROM Only.
My memory usage is as Follow:-
Its Okay that RAM Should not have anything, but why ROM goes to 22bytes while without anything it just have 14 bytes.
When i compile the program:-
Code C - [expand] 1 2 3 4 #include<xc.h> void main() { }
My Memory Usage is this.
when i use the following code
Code C - [expand] 1 2 3 4 5 6 #include<xc.h> unsigned int i=0; void main() { }
My Memory Usage is:-
Why 4 Bytes increased in Program ROM and 2 Bytes in RAM.
2Bytes can be increase in RAM but why 4 Bytes in ROM, Please explain me this.
When using the following Code, Storing value in ROM Only.
Code C - [expand] 1 2 3 4 5 6 #include<xc.h> const unsigned int i=0; void main() { }
My memory usage is as Follow:-
Its Okay that RAM Should not have anything, but why ROM goes to 22bytes while without anything it just have 14 bytes.