devxlogo

Memory Protection

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.

See also  5 Strategies for Supercharging Your CRM
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist