Click here to Skip to main content
15,887,988 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
char * ptr =0xA800;

pointer to pixel of screen. it doesnt work normally in program because generally its a text mode.

What I have tried:

to switch to graphics mode its imp to use either int86 or graphics.h (initgraph). pls tell me if there is any other way to switch to graphic mode i mean through some bios interrupts. and pls try that the code does not depend on os n also not on compiler that is it can run in windows,linux,unix also in gcc and turbo both
Posted
Updated 31-Mar-16 6:34am
v2
Comments
Patrice T 31-Mar-16 13:29pm    
tell which OS and C compiler.
Ravinder Singh 1-Apr-16 12:28pm    
every possible os n compiler

1 solution

You are trying to access the video memory using an ancient technology used by DOS programs.

This won't work anymore nowadays besides you are writing a DOS program and executing it in real DOS or an DOS emulator like DOSBox. If so, you must use a compiler that can create DOS programs and provides a standard library for DOS like Turbo C.

When using Linux outside a graphical environment you can use the Linux framebuffer - Wikipedia, the free encyclopedia[^] to access the video memory.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900