check if memory is accessible

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
      Does there exist an assembly instruction to check if a
particular memory is accessible

Best Regards,
Rakesh UV

Re: check if memory is accessible

Quoted text here. Click to load it

Yes, two are required.

Write a 0x00 to the memory location, then
Read it back and see if it is 0x00.

You can also Write/Read other values to the location as see if you
get the same value to read back.

By the way, which assembly instructions are you trying to use ??

donald

Re: check if memory is accessible
Quoted text here. Click to load it

What do you0 mean by "accessible" ?

-Michael

Re: check if memory is accessible
Quoted text here. Click to load it

Simple answer is NO. Complicated answer is it depends.  Depending on
the processor and the setup of registers, you can try to access a
particular memory address and see whether you get an "Memory abort"
type exception. If you do get an exception that means that the address
cannot be accessed with the method (Read/write/word/byte) you used.
If you don't care whether you destroy what ever is in that memory
location you can use Donald's solution.  But be careful of writing to
memory mapped register areas or memory mapped other device areas as it
could be permanent.
Cheers and Happy new year!
  Janaka

Site Timeline