-1

I want to draw a red line on my monitor directly writing to memory from my C++ code.

I know that modern operating system protect physical memory and it is hard to do.

Assuming that I know video card that I`m currently using (it is nVidia GeForce 820m in my case) also I could give all needed system rights for my application. I know that this is "bad idea". It is just my curiosity.

Is it possible on Linux or Windows?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Yuriy Pryyma
  • 574
  • 6
  • 18
  • 2
    Earlier before video accelerator cards came, graphic programmer directly write to video buffer which is located at A000h – seccpur Oct 18 '16 at 01:30
  • 1
    @seccpur: That worked until VGA broke through the 128KB reserved space. – MSalters Oct 18 '16 at 08:01

1 Answers1

0

Yes, sort of. Cross-site duplicate, but you do this by writing to /dev/fb0 in Linux. Windows doesn't expose the screen like that. And it's most likely not the real frame buffer, if that even exists.

Community
  • 1
  • 1
MSalters
  • 173,980
  • 10
  • 155
  • 350