Memory Protection

Question:
I’m writing a program in Windows 95.I try to READ memory address FFFF:0005 that contain BIOS date, by using peekb(int, int) function, but Windows displays a close message. How can I read the contents of this address?

Answer:
Sorry but the simple answer is that you should not. The whole point of a 32-bit proteced mode operating system is that applications cannot write to any address they like. Doing this would allow one program to corrupt another, which violates one of the prime goals of the operating system. I realize you only want to read that address but it is not set up that way.It is possible under Windows 95 to access a real-mode address but it is designed to happen only in device drivers. Unless you want to write a device driver, I would look for another way to do what you want. The Windows API is pretty rich and you might find some system calls that will give you what you need.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: