Is there anyway to dim a hardware address without xdata

General discussion on mikroBasic PRO for 8051.
Post Reply
Author
Message
sdkjdxgyq
Posts: 1
Joined: 09 Dec 2009 09:38

Is there anyway to dim a hardware address without xdata

#1 Post by sdkjdxgyq » 09 Dec 2009 09:52

I use at89s52 .Some hardware use address 0x8f00,0x8010,etc.
I must write <XDATA> <MIN_ADDR>0x0000</MIN_ADDR> <MAX_ADDR>0xFFFF</MAX_ADDR> </XDATA> in file "at89s52.mlk",
Although I just have 0x7FFF address of xdata.
Is there anyway dim xdata address without change the at89s52.mlk file.
In bASCOM-8051, I can use "out &h8000,0xff",
it will compile to "mov dptr,#h8000
mov @dptr,0xff",and I needn't DIM anything.
Is there anycode like that?
By the way,I'm a Chinese ,my English is poor.Is there any Chinese Documents?

foravr
Posts: 130
Joined: 11 May 2009 19:34

Re: Is there anyway to dim a hardware address without xdata

#2 Post by foravr » 10 Feb 2010 21:46

Hi,
i do not know if i understood you correctly. If you want to write a value at any adress in ram memory like the old poke instruction:

Code: Select all

dim peek as ^byte

peek = 4000
peek^ = 234
does the same as in old basic poke 4000,234

foravr

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

Re: Is there anyway to dim a hardware address without xdata

#3 Post by tihomir.losic » 11 Feb 2010 16:34

Hello,

The only thing which you must be careful is to keep that variables that
allocate the internal memory is not turning out the scope of internal memory,
because the compiler now will befall you to know. You can check by the end. LST file to see the last busy location that is not in external memory.

We apologize for these complications, but this is the only way to use external memory.
We will in the next version secure better process and using external memory from the compiler.

Thank you for your understanding.

Best regards,

Losic Tihomir
mikroElektronika [Support team]

Post Reply

Return to “mikroBasic PRO for 8051 General”