i could read address 0x82800 by this code :
mov R2,#0x2800 EXTS #8,#1 mov R1,[R2]
which R1 contains right answer .
but i cant write to this address with this code :
mov R1,0xffff mov R2,#0x2800 EXTS #8,#1 Mov [R2],R1
when i can read this location , why i can not write ? please help me.
Maybe google for the keyword "volatile"?
Have you spent some time looking inside the processor-specific header files, to see how the processor-specific register declarations are written? There is lot to learn by reading code.
What is special about this address? Is it RAM, a peripheral register, or FLASH? You are overly cryptic and vague about your purpose here.
If FLASH, perhaps memory_location = 0x0000; would be more instructive as most flash implementation erase to 0xFFFF and permit writes where bits transition from 1 -> 0, but not the other way round.