Hi all, according to Keil's C51 documentation the compiler should output a warning 259 when pointers to different memory spaces are intermixed. In a current project I painfully recognized that this does not seem to be the case for C51 versions 7.5 and 8.01. To check this out I created a new project and again I got no warning. This is what the compiler produced:
1: void main(void) 2: { 3: char xdata a; 4: char idata *p; 5: char xdata *q; 6: 7: p = &a; C:0x0003 7F00 MOV R7,#0x00 C:0x0005 8F08 MOV 0x08,R7 8: q=p; C:0x0007 AF08 MOV R7,0x08 C:0x0009 7E00 MOV R6,#0x00 C:0x000B 8E09 MOV 0x09,R6 C:0x000D 8F0A MOV 0x0A,R7 9: p=q; C:0x000F AE09 MOV R6,0x09 C:0x0011 AF0A MOV R7,0x0A C:0x0013 8F08 MOV 0x08,R7 10: }