The physical memory of a computer cannot be directly adressed or read or written in a modern OS. This used to be possible some 20-30 years ago, but since then memory managers were introduced, which map the physical addresses to virtual addresses. That is why you can run 10 applications that each allocate 1GB of memory on a system that only has 2 GB of memory available!
What you have in mind therefore requires an entirely different approach. The operating system offers many libraries with functions that give you access to all kind of information. For instance you can query the current time using the
C Time library[
^]. Setting the system time is also possible, but it depends on the OS what function to use. E.g. for Windows you can use
SetSystemTime()[
^]
More generally, whatever you wish to query or change in the system, just google for it, and you will find a multitude of references to system libraries and functions, often with example code on how to use them.