如何从文本模式切换到视频模式 [英] How do I switch to vedio mode from text mode
本文介绍了如何从文本模式切换到视频模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
char * ptr = 0xA800;
指向屏幕像素的指针。它在程序中不能正常工作,因为它通常是一种文本模式。
我尝试过:
切换到图形模式,其imp使用int86或graphics.h(initgraph)。请告诉我,如果有任何其他方式切换到图形模式我的意思是通过一些BIOS中断。并尝试代码不依赖于os n也不依赖于编译器,它可以在windows,linux,unix中也运行在gcc和turbo中
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
推荐答案
您正在尝试使用DOS程序使用的古老技术访问视频内存。
除了您正在编写DOS程序并执行它之外,现在它不再起作用了在真正的DOS或DOS模拟器,如DOSBox。如果是这样,您必须使用可以创建DOS程序的编译器,并为DOS提供标准库,如Turbo C.
在图形环境外使用Linux时,您可以使用 Linux framebuffer - 维基百科,免费的百科全书 [ ^ ]访问视频内存。
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.
这篇关于如何从文本模式切换到视频模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文