Regards, Gunnar Knutson
C allows you to cast an integer to a pointer type, like this:
*my_int_ptr = (int *) 0xF00BA;
(and similarly, of course, for other pointer types). The result of
this is implementation defined so may vary from compiler to compiler.
However, one common implementation is that the result is a pointer
to whatever object is located at that address.
Whether or not this gives you the result you wanted depends entirely
on your platform, operating system and compiler. For example, with
my UNIX-like OS there's just no way for an ordinary program to
access the whole of physical memory. For more information you'll be
best off asking in a newsgroup targeted at your particular system.
Cheers,
Richard
--
Richard Stamp
Churchill College, Cambridge
>How do I declare and initialize a pointer to an absolute memory address
>in C?
>What I want do do is access all my 32K of memory byte by byte starting
~~~~~~~~~~~~~~~~~~~~
Programming a gas pump? ;-)
Ulric
--
Another opinion presented as fact.