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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/20/03 20:45
Read: times


 
#48933 - pointer
unsigned char x;
unsigned char xdata *p;  // Pointer to a byte in XDATA

p = 0x0000; 
x = *p;     // Gets the byte from address 0x0000 in XDATA

p = 0x1234;
x = *p;     // Gets the byte from address 0x1234 in XDATA

p = 0xFFFF;
x = *p;     // Gets the byte from address 0xFFFF in XDATA

This is pretty much standard 'C' - the only 8051-specific bit (Keil) is the keyword xdata to specify the address space.

It's all in the Manual ;-)

All you need is to load the pointer value from your command interpreter...

List of 3 messages in thread
TopicAuthorDate
pointer            01/01/70 00:00      
   RE: pointer            01/01/70 00:00      
   RE: pointer            01/01/70 00:00      

Back to Subject List