Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

How to detect the text mode? (Developers)

posted by jassenna, Campinas,SP,Brazil, 30.12.2020, 17:56

> > So the question is, how to easily distinguish between text mode and
> graphic
> > mode.
>
> If the graphics card is VGA compatible, there are at least 2 options:
>
> 1. graphics controller, port 3CEh, index 6: if bit 0=1, graphics mode
> active
> 2. attribute controller, port 3C0h, index 10h: if bit 0=1, graphics mode.

There is a third that I use:
INT10 function 1Bh . This function is well documented both in RBIL
and in "PC Video Systems".
It returns a 64 byte data structure containing, among other info,
video mode, number of characters/line, number of lines/screen.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 247 users online (1 registered, 246 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum