5

I'm writing code which runs in real mode before any OS is loaded. Part of my program involves a dump of information to the video display, and the standard 80x25 text mode is not cutting it.

Many versions of Windows and other OSes seem to have no trouble switching to some larger text mode, 43 line I think, when they show kernel panics. I know larger text modes have been around a long time so I would expect there's at least one standard mode.

There's a pretty large list of BIOS video modes here:

http://www.columbia.edu/~em36/wpdos/videomodes.txt

Unfortunately, the same mode numbers seem to vary wildly in meaning between chipsets.

Once upon a time I seem to remember having used a thing called VESA BIOS to access Super VGA graphics modes in a device-independent manner, but I also seem to remember that involving a DOS TSR which had to be loaded in. That's not an option here as DOS is not running.

I'm looking for a mode that will work on the widest variety of hardware, including the virtual video adapter in VMware ESXi. The code to change modes needs to be compact also, so I was hoping a simple Int 10h would do it.

Any ideas? How do the Windows & VMware kernel panics do it?

Mat
  • 202,337
  • 40
  • 393
  • 406
Kevin
  • 1,179
  • 7
  • 18
  • 1
    640x350 is an ancient EGA video mode to hold 43+ lines 8px high. Those panics screens you see might be video modes, not text modes. I remember 43/50 lines *text* modes on EGA/VGA though, have a look [here](http://computer-programming-forum.com/29-pascal/1f1b08c6aa9387f6.htm) at code snippets on switcing to them. – Roman R. Feb 10 '13 at 13:52

1 Answers1

5

You can use 80x25 mode and load an 8x8 font (ax = 1112h), that will result in 80x50 characters. As far as I can remember, that was pretty standard.

robertklep
  • 198,204
  • 35
  • 394
  • 381
  • so, `MOV ax, 1112h` `INT 10h` from a 80x25 mode will do? – John Dvorak Feb 10 '13 at 14:10
  • 1
    Found this: http://board.flatassembler.net/topic.php?t=3659 You'll need to clear bx as well (which, according to http://webpages.charter.net/danrollins/techhelp/0159.HTM sets the font to use) – robertklep Feb 10 '13 at 16:07
  • Thank you for the info! Not all BIOS references list this call, but once I knew to look for it I also ended up finding a much better reference. :) [link](http://www.ctyme.com/intr/int.htm) @Jan Not quite... you have to first load BL to indicate the char block table to use, or else you may get garbled output. Not sure what all the values are but BL=00h seems to be the 'usual' character set. If you're in 80x25 mode (mode 03h) you don't need to set the mode and in fact the existing text will remain intact. – Kevin Feb 10 '13 at 17:42
  • (Didn't see your additional comment until after I commented. Good links there, too.) – Kevin Feb 10 '13 at 17:51