With high-level languages, 80x50 VGA text mode is easy. Now, I'm in
Assembly, and I've tried almost every single ROM & DOS BIOS call for
graphics, and I cannot achieve 80x50 mode. What can I do (short of
shelling with a 'mode 80,50' ??)
--
--------
White Flame (aka David Holz) Guitar-playing, C=64-using, GMI-attending,
holz...@nova.gmi.edu Dream Theater-listening weird kind o' guy.
"And now I will show you the Most Excellent way..." 1 Corinthians 13
"Blood, heal me. Fear, change me. Belief will always save me.
Blood, staring. Fear, swearing. Conviction made aware..." - Dream Theater
Interestingly enough, I just answered that question yesterday on CompuServe,
as follows:
-----
First, you select a standard 80x25 color text mode, as so:
mov ax, 0003h
int 10h
Next, you change the font to 8x8 (from 16x8) with a reset:
mov ax, 1112h
xor bl, bl
int 10h
Simple, eh?
Hope this helps,
Gregg Seelhoff, Technical Director
--
Sophisticated Software Systems
"Nothing short of a Masterpiece."
mov AX, 1112h
mov BL, 0
int 10h
That assumes you're already in text mode, if you're not then do that call,
too.
Two out of three. Aside from setting text mode and loading the ROM
font, there's one step you should do before either one of those:
mov ax,1202h
mov bl,30h
int 10h
This will cause the video to reset to 400 scanlines on the next mode set
in case the video card is in a 200- or 350-scanline text mode. This
just prevents you from unintentionally getting 80x43 (or staying in
80x25 if 200 scanlines is selected) when you're expecting 80x50. It
might not be a major factor, but it will make the code more robust.
--
Scott Earnest | _,-""-_,-""-_,-""-_,-""-_,-""-_,-"
|
set...@ix.netcom.com (primary) | We now return you to our regularly
|
sin...@cyberspace.org (alternate) | scheduled chaos and mayhem. . . .
|
>With high-level languages, 80x50 VGA text mode is easy. Now, I'm in
>Assembly, and I've tried almost every single ROM & DOS BIOS call for
>graphics, and I cannot achieve 80x50 mode. What can I do (short of
>shelling with a 'mode 80,50' ??)
mov ax,1112h
mov bl,0
int 10h
-Chris
Simon Hosie wrote:
> mov AX, 1112h
> mov BL, 0
> int 10h
>
> That assumes you're already in text mode, if you're not then do that call,
> too.
Scott Earnest:
> Two out of three. Aside from setting text mode and loading the ROM
> font, there's one step you should do before either one of those:
>
> mov ax,1202h
> mov bl,30h
> int 10h
>
> This will cause the video to reset to 400 scanlines on the next mode set
> in case the video card is in a 200- or 350-scanline text mode.
On the next mode set? I guess that's why it never worked for me.. well,
that and the fact that I was hoping that I could get 480 by passing al=3.
> > [...]
> >
> > This will cause the video to reset to 400 scanlines on the next mode set
> > in case the video card is in a 200- or 350-scanline text mode.
>
> On the next mode set? I guess that's why it never worked for me.. well,
> that and the fact that I was hoping that I could get 480 by passing al=3.
Yep, the next mode set. This call is *specifically* for setting
scanlines in alphanumeric (text) modes, and the standard VGA only
provides 200, 350, or 400 scanlines for text mode. Unless there's some
odd trick I have yet to see, I don't believe getting more that 400
scanlines in text mode is possible. 480 scanlines in graphics mode,
though, is done by programming the registers (automagically done when
you call the BIOS to, say, set mode 12h). So, passing AL=3 and
expecting 480 is wishful thinking. :-) BTW, after this BIOS call, if
AL!=12h, the call failed, and you can use that to verify that the video
card doesn't know what you want there.
Scott Earnest:
> Yep, the next mode set. This call is *specifically* for setting
> scanlines in alphanumeric (text) modes, and the standard VGA only
> provides 200, 350, or 400 scanlines for text mode. Unless there's some
> odd trick I have yet to see, I don't believe getting more that 400
> scanlines in text mode is possible.
Geez, I've just reconfigured my keyboard to be a Dvorak one, it seemed
like a good idea at the time but now I have to try to post with the damned
thing, and I must be back down to about 10 to 15 words per minute.. but, I
said that I wasn't going to learn to touch type until I had one, and now I
have one..
Anyway, the reason that I tried it was that some cards offer 30 and 60
line text modes, and I wanted to see if I could talk my card into offering
the same. It seemed the logical way to implement it.
> 480 scanlines in graphics mode, though, is done by programming the
> registers (automagically done when you call the BIOS to, say, set mode
> 12h). So, passing AL=3 and expecting 480 is wishful thinking. :-)
Well, if there was going to be a way of setting it via BIOS then that
would have been it.
> Anyway, the reason that I tried it was that some cards offer 30 and 60
> line text modes, and I wanted to see if I could talk my card into offering
> the same. It seemed the logical way to implement it.
There are some "odd" vertical screen sizes I've seen (12, 21, 28, 29,
35, etc.), but every one I've seen uses either 350 or 400 scanlines, and
loads either a customized font map, or one that isn't the regularly used
one. For instance, you can get 28 text lines by loading the 8x14 font
while using 400 scanlines. Or get 21 by loading the 8x16 font map while
using 350 scanlines. Basically, you can predict the screen size by
figuring:
# text rows = # scanlines / character cell height
The decimal part is always rounded down.
60 could be possible in 400 scanlines with a 6-line-high font map, but
text can look awfully squashed. I've seen 80x60 text screens, but when
I've seen it, it was using the 8x8 font map on a 640x480 graphics mode
to emulate a text mode. Not *quite* the same.