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 Japheth Homepage, Germany (South), 15.11.2020, 17:13

> Howto detect text-mode segment 0xB000 ? (instead 0xB800)
> This is case for MDA and Hercules (not sure).
> Is it enough - 0040:0065 bit 3 ? (2 in RBIL notation)

Checking BIOS variables is ok in most cases. Usually if word at 40h:63h is 3D4h, it's meant a "color" mode starting at 0B800h, and 3B4h means "monochrome" mode at 0B000h

What's more fun is to check the graphics controller, "miscellaneous" register 6, bits 2-3:


       3  2          Addressing Assignment                                                               
       0  0          A0000 for 128KB                                                                     
       0  1          A0000 for 64KB                                                                       
       1  0          B0000 for 32 KB                                                                     
       1  1          B8000 for 32 KB                                           


So you can even set your text mode buffer to A000, size 128 KB. However, I'm not sure if all VGA-compatible cards will accept this.

http://www.o3one.org/hwdocs/vga/vga_app.html

---
MS-DOS forever!

 

Complete thread:

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