May be you should post some more details about the environment. Any way, this is how u do it on DOS. Take a char far pointer, put the base address of the display buffer and you are all set! for SVGA cards, the starting address is 0xA000000l; (mind u, its 'L' in lower case at the end, not 1 (one))
Code:
char far *scrPtr=(char far*)0xA0000000l;
long scrIdx=0;
printf("\nColor of the TOP LEFT pixel is %d",*scrPtr);
//filling the screen blue.
for(scrIdx=0;scrIdx<480000;scrIdx++)
scrPtr[scrIdx]=(char)55;
similar approach would be there for other OS. Its also possible that functions are available for doing this job. I hope it was helpful.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.