Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/22/04 14:31
Read: times


 
#67197 - RE: Begin at the beginning!
Responding to: ???'s previous message
thanks andy,

may be i took the concept incorrectly.

if i tell bl51 linker that my pdata base is 0x2000,
i thougt it will block the first 256 locations as
pdata,
so that any xdata var declaration will be located
above 0x20ff.

to my experience that's not the case.
this is my code:

unsigned char pdata my_p;
unsigned char xdata my_x;
.....
printf("my_p loc = %pn", &my_p);
printf("my_x loc = %pn", &my_x);

and this is the output:

my_p loc = p:2000
my_x loc = x:2001

(xdata is located at the same page with pdata)

i add iteration with my_p++ and my_c--, and have
checked their contents via memory window/dump,
the result is consistent.

from disassembly window i can see
movx @r0, a -> for my_p and
movx @dptr, a -> for my_x

everything looks fine to me except:
page sharing between pdata and xdata

btw, this is the setting i've made:

1. option for target
target tab
off chip xdata memory
start = 0x2000
size = 0x8000
bl51 locate tab
pdata base = 0x2000

2. startup.a51
ppageenable = 1
ppage = 20H

what do you think andy?
did i take the concept incorrectly,
or is there something i missed?

regards.
ab

ps:
of course i understand that we can easily get mad
for a 'give me the code' sort of message,
but is there a standard criteria here to judge
such a poster?
i need that...:)

List of 12 messages in thread
TopicAuthorDate
keil pdata            01/01/70 00:00      
   Begin at the beginning!            01/01/70 00:00      
      RE: Begin at the beginning!            01/01/70 00:00      
         RE: Begin at the beginning!            01/01/70 00:00      
            RE: Begin at the beginning!            01/01/70 00:00      
               RE: Begin at the beginning!            01/01/70 00:00      
               RE: Begin at the beginning!            01/01/70 00:00      
                  RE: Begin at the beginning!            01/01/70 00:00      
   RE: keil pdata            01/01/70 00:00      
      RE: keil pdata            01/01/70 00:00      
         RE: keil pdata            01/01/70 00:00      
            RE: keil pdata            01/01/70 00:00      

Back to Subject List