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.