Reading specified Location

  • Thread starter Himanshu Singh Chauhan
  • Start date
H

Himanshu Singh Chauhan

Hi all!

I was wonder if there is any way of reading any specified location on
RAM, as we can read any specified sector from diskettes using
absread().

Is it possible, I mean i think protected mode may not permit it. If is
possible then how can it be done.

Thanx in advance.

Himanshu
 
K

Kevin Goodsell

Himanshu said:
Hi all!

I was wonder if there is any way of reading any specified location on
RAM,

Standard C doesn't specify if that's possible. Your OS may disallow it.
as we can read any specified sector from diskettes using
absread().

That is not a standard C function. This is another thing that standard C
does not specify how to do, and your OS may disallow it.
Is it possible, I mean i think protected mode may not permit it. If is
possible then how can it be done.

We don't know, since we don't know anything about the system you are
targeting. If we did, it would be off topic here. Try a group that
discusses programming for the system you are targeting.

-Kevin
 
G

Gordon Burditt

I was wonder if there is any way of reading any specified location on
RAM, as we can read any specified sector from diskettes using
absread().

If you are accessing a memory location in the same address space
as your program, load up a pointer with something and then dereference
it. Depending on where you get your pointer value from, this is
likely to be unportable. If you guess wrong, your program is likely
to (but not guaranteed to) abort.
Is it possible, I mean i think protected mode may not permit it. If is
possible then how can it be done.

If you are trying to access a memory location *NOT* in your address
space (e.g. physical memory or memory-mapped peripherals, or memory
used by the BIOS), chances are your only hope is to ask the OS
nicely and it might put it in your address space or access it for
you. WHERE it puts it is another question, but often it will give
back a pointer to whereever it put it.

Gordon L. Burditt
 
C

CBFalconer

Himanshu said:
I was wonder if there is any way of reading any specified location
on RAM, as we can read any specified sector from diskettes using
absread().

Please tell me where diskettes and/or absread() are defined in the
C standard? In other words this is far off topic for c.l.c, where
we deal only with portable, ISO standard C. See the welcome
message and FAQ.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top