How to use upper 128byte of AT89S52. i.e. SFRs(80H to FFH) Address indirectly with KEIL C51 for general purpose which are not in use. They are directly addressable only as SFR.
according to datasheet: 1. The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly addressable. 2. The higher 128 bytes of RAM (80H to FFH) are indirectly addressable. 3. The special function registers (80H to FFH) are directly addressable only.
Please help me thanks!
idata char aVariable; is all he needs
This is C you do not write to unallocated space.
data char aVariable; idata char aVariable; pdata char aVariable; xdata char aVariable;
Then use the variable normally.
char aVariable; This goes into the space chossen by the memory model you chose.