#include<stdio.h> #include<reg52.h> #define XBYTE ((unsigned char volatile xdata*) 0 unsigned char dummy = 0x55; bit bitValue; void main (void) { bitValue = dummy & 0x40; XBYTE[0x1234]= 0x55; return; }
This program doesnt execute. plz query this program immediately.In the memory location the acc value is 0x55.
#define XBYTE ((unsigned char volatile xdata*) 0 XBYTE[0x1234] = 0x55;
two problems 1. XBYTE is defined by the compiler. Look it in the docmentation. 2. Is that a valid ANSI C statment
unsigned char volatile xdata *bytePtr; bytePtr[0x1234] = 0x55; should work