it depends on the processor and compiler. Generally you create a pointer to the type of variable in memory you wish to manipulate, then assign an address to that pointer and use it as one would any pointer by dereferencing it, e.g. a DOS program to clear the video RAM on a PC
-
byte *video_start = (byte *) 0xB8000000L; /* define start of PC video RAM */
-
-
byte *video_mem = video_start; /* pointer initialised to video RAM */
-
-
/* clear 25 lines of 80 characters (character plus attribute byte) */
-
while (video_mem < video_start + 160 * 25)
-
{
-
*video_mem++ = ' '; /* set character to space */
-
*video_mem++ = (byte) attribute; /* set attribute */
-
}
-
have a look thru the compiler manuals and help pages - it should tell you how to do this type of operation on your system