Hi, I'm trying to get far memory simulated for the attached program. variable.c
unsigned char far large_array0[0x10];
unsigned char far large_array0[0x10]; extern unsigned char far large_array1[0x10]; void main (void) { unsigned int i; for (i = 0; i < sizeof (large_array0); i++) { large_array0[i] = (unsigned char) i; } for (i = 0; i < sizeof (large_array1); i++) { large_array1[i] = (unsigned char) i+0x80; } for (i = 0; i < 20; i++) { if(large_array0[i]!=i) goto error; } while (1); error: while(1); }
HDATA (X:0x028000-X:0x028010, X:0x038000-X:0x038010)
BASE START END USED MEMORY CLASS ========================================================== X:000000H X:000000H X:007FFFH XDATA C:000000H C:000000H C:007FFFH 0001E9H CODE X:000000H X:028000H X:028010H 000020H HDATA X:038000H X:038010H I:000000H I:000000H I:0000FFH 000001H IDATA I:000000H I:000000H I:00007FH 000008H DATA VALUE CLASS TYPE PUBLIC SYMBOL NAME ================================================= 02028000H HDATA --- large_array0 02038000H HDATA --- large_array1
Hi, Interesting to know is that when I switched to XBANKING.A51, the error was still the same. But when I switched also the device to Analog devices ADuC812 and setting the extended DPTR register for addressing HDATA, it simulated correctly!
?C?XPAGE1SFR DATA 084H ; SFR Address of XPAGE1 register (DPP register) *