??? 05/16/05 16:43 Read: times |
#93497 - its even simpler Responding to: ???'s previous message |
All access to memory psace in the 8052 are to/from data memory wether its internal or external as defined by a compiler such as sdcc and this uses MOV instructions,if a code space access is implied with in sdcc then it has to be done by the use of pointers like so:
Pointers to MCS51/DS390 specific memory spaces SDCC allows (via language extensions) pointers to explicitly point to any of the memory spaces of the 8051. In addition to the explicit pointers, the compiler uses (by default) generic pointers which can be used to point to any of the memory spaces. Pointer declaration examples: /* pointer physically in internal ram pointing to object in external ram */ xdata unsigned char * data p; /* pointer physically in external ram pointing to object in internal ram */ data unsigned char * xdata p; /* pointer physically in code rom pointing to data in xdata space */ xdata unsigned char * code p; /* pointer physically in code space pointing to data in code space */ code unsigned char * code p; /* the following is a generic pointer physically located in xdata space */ char * xdata p; Well you get the idea. |
Topic | Author | Date |
Writing into Data memory of 8051 in C | 01/01/70 00:00 | |
Writing into Data memory of 8051 in C | 01/01/70 00:00 | |
Writing into Data memory of 8051 in C | 01/01/70 00:00 | |
Writing into Data memory of 8051 in C | 01/01/70 00:00 | |
its very clever | 01/01/70 00:00 | |
SDCC | 01/01/70 00:00 | |
writing a value in data memory 8051 | 01/01/70 00:00 | |
8051 harvard arch. then how its possible | 01/01/70 00:00 | |
C, memory, and address spaces | 01/01/70 00:00 | |
its even simpler![]() | 01/01/70 00:00 |