Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/25/03 01:22
Read: times


 
#37228 - RE: DATA to XDATA problem
<html>
1. U8 u8Array[10]=0;
the array is declared and allocated and all the values are set to 0.

i doubt the compiler will let you do this; if it did, you'd be allocating u8Array and then screwing it up by pointing it to address zero. use:
U8 u8Array[2] = { 0, 0 };

2. U8 *u8Array=0; What will be set to 0 ???
the pointer u8Array will be set to point to address 0.


3. the Keil example :
unsigned char xdata foo;
unsigned char xdata *foo_ptr = &foo;
The array foo_ptr is declared and initialized with the value contained in foo.

that looks wrong; it looks like foo_ptr is being initialized with the address of foo, not the value contained in foo.


james



List of 12 messages in thread
TopicAuthorDate
DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      
RE: DATA to XDATA problem            01/01/70 00:00      

Back to Subject List