Hi all,
I am looking to change the usual DOS 80x25 console text mode into something like 132x44 or 132x60 so that I can use more real estate in console-like programs that print a lot of text out to stdout.
The SVGA/VESA aspect of switching to these modes is well covered, and I can set up the text modes I want.
However, I observe when I call INT 10h to set up e.g. 132x44 text mode in a program I compile with Borland Turbo C++ 3.0, then most of the text output API functions that it provides start to break down:
- gettextinfo() function returns 80x25 if I started the program in 80x25 mode but switched to 132x44 while running the program.
- gettextinfo() function returns and odd 132x25 mismatched resolution if current DOS text resolution was 132x44 already when I start the program.
- cprintf() function (for printf() with colors) behaves as if constrained by the window that gettextinfo() reports, e.g. it begins to scroll the view after 25 rows even though there would still be many lines of room on the console.
- gotoxy() does nothing if called with y coordinate > 25.
I found there is a DOS memory location 44Ah that contains the number of text columns the current mode has: https://wiki.osdev.org/Memory_Map_(x86) Observing that memory location does print out 132 columns correctly. I cannot find if there might exist a similar memory location somewhere?
The DOS interrupt for acquiring information about current video mode ( https://stanislavs.org/helppc/int_10-1b.html ), does correctly report 44 in the "22 byte number of displayed character rows" field, so I am thinking that this is maybe a Borland Turbo C++ 3.0 issue, and not a DOS/BIOS/VGA adapter issue.
So I am kind of leaning towards this just being a Borland bug, and I should roll out my own printf() functions to sidestep the issue.. but I wonder if there might be something that I might be overlooking? Maybe there could be a way to tell Borland about the nonstandard screen size? I found the window() function, but looks like that does not work to expand beyond 80x25 window. I was pondering if there might have been an easy way to disassemble what Borland does inside its gettextinfo() function to arrive to the wrong conclusion about number of rows, but my disasm skills weren't quite up to par for that..
Any tips? Thanks!
I am looking to change the usual DOS 80x25 console text mode into something like 132x44 or 132x60 so that I can use more real estate in console-like programs that print a lot of text out to stdout.
The SVGA/VESA aspect of switching to these modes is well covered, and I can set up the text modes I want.
However, I observe when I call INT 10h to set up e.g. 132x44 text mode in a program I compile with Borland Turbo C++ 3.0, then most of the text output API functions that it provides start to break down:
- gettextinfo() function returns 80x25 if I started the program in 80x25 mode but switched to 132x44 while running the program.
- gettextinfo() function returns and odd 132x25 mismatched resolution if current DOS text resolution was 132x44 already when I start the program.
- cprintf() function (for printf() with colors) behaves as if constrained by the window that gettextinfo() reports, e.g. it begins to scroll the view after 25 rows even though there would still be many lines of room on the console.
- gotoxy() does nothing if called with y coordinate > 25.
I found there is a DOS memory location 44Ah that contains the number of text columns the current mode has: https://wiki.osdev.org/Memory_Map_(x86) Observing that memory location does print out 132 columns correctly. I cannot find if there might exist a similar memory location somewhere?
The DOS interrupt for acquiring information about current video mode ( https://stanislavs.org/helppc/int_10-1b.html ), does correctly report 44 in the "22 byte number of displayed character rows" field, so I am thinking that this is maybe a Borland Turbo C++ 3.0 issue, and not a DOS/BIOS/VGA adapter issue.
So I am kind of leaning towards this just being a Borland bug, and I should roll out my own printf() functions to sidestep the issue.. but I wonder if there might be something that I might be overlooking? Maybe there could be a way to tell Borland about the nonstandard screen size? I found the window() function, but looks like that does not work to expand beyond 80x25 window. I was pondering if there might have been an easy way to disassemble what Borland does inside its gettextinfo() function to arrive to the wrong conclusion about number of rows, but my disasm skills weren't quite up to par for that..
Any tips? Thanks!