Abdul Mutalib

DATA_SEG doesnt work as written

Discussion created by Abdul Mutalib on Jun 1, 2007
Latest reply on Jun 14, 2007 by Abdul Mutalib
Hi Experts,
 
   I have problem in placing a variable in zeropage to use in direct addressing mode. But, when compile and debug in full chip mode, I found all my variable are still in RAM( need to use exended mode to access this) which i dont prefer for timing reason. My codes are;
 
#pragma DATA_SEG directPAGE
 
char var1;
int var2;
 
#pragma DATA_SEG DEFAULT
 
char others[20];
 
In PRM file, I have this:
 
SEGMENTS
ROM     = READ_ONLY  0x8000 TO 0xFDFF;
RAM     = READ_WRITE 0x100 TO 0x34F;
Z_RAM = READ_WRITE 0x0050 TO 0x00FF;
END
 
PLACEMENT
    DEFAULT_RAM                                                               INTO  RAM;
    DEFAULT_ROM, ROM_VAR, STRINGS                        INTO  ROM;
    directPAGE                                                                      INTO  Z_RAM;
END
 
I also confirm that all my directPAGE variable doesnt exceed the allocation.
 
Thanks

Outcomes