I told you how to do it right. Do it the OS-specific way. valaris was kind enough to point out some Windows functions.
No, I said it because it's the truth. The proper way of messing with a console is to use the system specific methods.
Since you want to know theory.... OK, here you go. Make sure you follow these steps in the following order:
- Write your own OS.
- Write your own console.
- Implement your own OS-specific way of doing it.
What I keep telling you is that Windows won't let you mess around with raw memory. You have to do it via the Windows way.
I'm starting to think you have a reading comprehension problem.