| ??? 12/18/02 13:25 Read: times |
#34665 - RE: SDDC: Code var..., Donald 2 |
Michael,
Just change the memory space qualifier: unsigned char xdata *fred=(unsigned char xdata *)0; What this does is create a pointer to data type 'unsigned char' in the xdata memory space and initialises it (the pointer) to zero (the first location in xdata). As pointers and arrays in 'C' are pretty much the same thing you can get the value stored at xdata location zero by either: byte=*fred; or byte=fred[0]; The next byte (location 1) can be retrieved by either: byte=*(fred+1); or byte=fred[1]; etc. In case you're not clear on pointers try thinking of it this way: A variable contains a value. A pointer contains the address at which a value is stored. |
| Topic | Author | Date |
| SDDC: Code var must have initialiser | 01/01/70 00:00 | |
| RE: SDDC: Code var must have initialiser | 01/01/70 00:00 | |
| RE: SDDC: Code var must have initialiser | 01/01/70 00:00 | |
| RE: SDDC: Code var must have initialiser | 01/01/70 00:00 | |
| RE: SDDC: Code var..., Donald | 01/01/70 00:00 | |
| RE: SDDC: Code var..., Donald 2 | 01/01/70 00:00 | |
RE: SDDC: Code var..., Donald 2 | 01/01/70 00:00 |



