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

initializing globals problem

HI,

I am new to the micro controllers , i am initializing the globals but when i try to access the globals in my program i am not able read the data , but when i try to modify the globals in my function i am able to read the modified data , i checked in these forum where i got to know that startup code has to be used, even i tried that method still the problem i persist, and i am using large memory model in my project.

for example

 unsigned char *p = "hello";
 void main()
 {
    printf("%s",p);

 }

where i get "null" get printed .


Regards,
Lokesh Yadav

0