Hi,
Say that you got the following Code that was burnt into ROM of a DSP Processor:
How would localvar and globvar be placed in ROM?
for example, will the ROM include for each:
for globvar:
- Address in Static Area of RAM
- Size
for localvar:
- Address in RAM (Stack)
- Size
- - - Is localvar's memory address in RAM determined on run time?
Thank you.
Say that you got the following Code that was burnt into ROM of a DSP Processor:
Rich (BB code):
#include <stdio.h>
int globvar;
int main()
{
int localvar = 5;
scanf("%i, &globvar);
localvar = globvar + 5;
printf("Sum of Global and Local is: %i", globvar+localvar);
return 0;
}
How would localvar and globvar be placed in ROM?
for example, will the ROM include for each:
for globvar:
- Address in Static Area of RAM
- Size
for localvar:
- Address in RAM (Stack)
- Size
- - - Is localvar's memory address in RAM determined on run time?
Thank you.