INT 10h, AH=00h, AL=5Ch crashes XP - why ?

37 views
Skip to first unread message

R.Wieser

unread,
Oct 13, 2020, 4:48:01 AM10/13/20
to
Hello all,

I've made a simple 16-bit DOS program cycling thru all video-modi from 00h
upto 7Fh and output (redirected to file) the effective video modus and what
the width and height of each is (looking in the 0040:xxxx memory segment).
Which seems to work alright (I get a full list). (remark: I've already
excluded the "special" and "reserved" video modi)

But switching back to the desktop (from a full-screen DOS window) goes
wrong: All I see is a black screen with the mousepointer (which I can move),
and after a few seconds the 'puter reboots. :-(

I think I've isolated the offending video-modus to 5Ch. The problem with
it is that RBIL doesn't show that mode as being special or reserved. Also,
the output shows it being a valid modus (0040:0049) and the resolution seems
to be alright too (1920x1440)

Remark: video modus 4Dh (with the same, highest resolution) doesn't cause a
problem (though RBIL doesn't mention the returned resolution ...).

My questions:

1) Does anyone know how/why video-mode 5Ch causes XP to malfunction

2) Is there a DOS, INT10h way to check if a video-modus is acceptable other
than to try it and see the 'puter crash ?

I just realised: it could have something to do with the ammount of colors
(read: ammount of needed video memory), but a quick look doesn't show any
such info being stored in the 0040:xxxx memory segment.

Regards,
Rudy Wieser


wolfgang kern

unread,
Oct 13, 2020, 9:10:35 AM10/13/20
to
1) it's VENDOR specific:
INT_10_00__
5Ch = T 100x37 8x16 NEL Electronics BIOS
= G 640x400 256 Logix, ATI Prism Elite
= G 640x400 256 Maxxon, SEFCO TVGA, Imtec
= G 80x25 8x16 640x400 256/256K A000 Zymos Poach, Hi Res 512
= G 80x25 8x16 640x400 256/256K A000 Trident TVGA 8800/8900
= G 80x30 8x16 640x480 256 Genoa 6400
= G 80x30 8x16 640x480 32K A000 Oak OTI-077 chipset [8]
= G 100x75 8x8 800x600 256 A000 NCR 77C22 [9]
= G 100x75 8x8 800x600 256/256K A000 WD90C
= G 100x75 8x8 800x600 256/256K A000 Diamond Speedstar 24X
= G 100x37 8x16 800x600 256/256K A000 Cirrus CL-GD5420/5422/5426
and perhaps your graphic chip doesn't have it.

2) VESA is your friend here, it can list all available modes and also if
asked it reports in deep detail what a certain mode is able to do.

look at INT 10_4F_00...
__
wolfgang

R.Wieser

unread,
Oct 13, 2020, 12:39:15 PM10/13/20
to
Wolfgang,

> 1) it's VENDOR specific:
...
> and perhaps your graphic chip doesn't have it.

In that case I would assume that looking at 0040:0049 (after calling INT
10h, AH=00h) would not return the set video mode, and that others like it
(0040:004A/B, 0040:0084 and 0040:0085/6) would return (some) zero values
(as quite a few other invalid modi do).

But what I get is this (below memory adresses have been set to -1 before
switching video modus):
Video mode set: 5C
0040:0049=5C
0040:004A=000F0
0040:0084=5A
0040:0085=0010

IOW, it responds as if it accepted the set video mode.

I've got more problems though: I tried to set mode 30h, 32h and 34h, but
that trashes text (it gets horizontally smeared out), it doesn't seem to
want to plot pixels (INT 10h, AH=0Ch BH=00h) and enableing the mouse (INT
33h, ax=0001h) causes an NTVDM unrecognised instruction crash. :-|

In short, I have no idea what exactly is going on, but it looks that my
'puters integrated video card doesn't match its BIOS. :-( (its an Dell
Optiplex 745)

And by the way: When I use 5Ch OR 80h (set video mode but do not clear the
screen) XP doesn't crash (can't test it further though, as the video output
seems to be outside the capabilities of my monitor).

> 2) VESA is your friend here, it can list all available modes and also if
> asked it reports in deep detail what a certain mode is able
> to do.
>
> look at INT 10_4F_00...

Yeah, some while ago I played around with that too. But I hoped to be able
to do a /simple/ video-mode switching ...

Regards,
Rudy Wieser


JJ

unread,
Oct 13, 2020, 9:32:35 PM10/13/20
to
On Tue, 13 Oct 2020 18:38:58 +0200, R.Wieser wrote:
> But what I get is this (below memory adresses have been set to -1 before
> switching video modus):
> Video mode set: 5C
> 0040:0049=5C
> 0040:004A=000F0
> 0040:0084=5A
> 0040:0085=0010

That's definitely a custom video mode. Not yet listed in RBIL.

> I've got more problems though: I tried to set mode 30h, 32h and 34h, but
> that trashes text (it gets horizontally smeared out), it doesn't seem to
> want to plot pixels (INT 10h, AH=0Ch BH=00h) and enableing the mouse (INT
> 33h, ax=0001h) causes an NTVDM unrecognised instruction crash. :-|

Have you tried running the test from pure DOS?

> In short, I have no idea what exactly is going on, but it looks that my
> 'puters integrated video card doesn't match its BIOS. :-( (its an Dell
> Optiplex 745)

I suggest you check the video BIOS. e.g. with DEBUG command:

d c000:0

Enter `d` to view the next page.

And if you don't mind, share the BIOS. Use below DEBUG command to save the
video BIOS (as 32K BIOS) to a file.

m c000:0 7fff 100
n vbios.bin
rcx 8000
w

R.Wieser

unread,
Oct 14, 2020, 4:50:58 AM10/14/20
to
JJ,

> That's definitely a custom video mode. Not yet listed in RBIL.

I can imagine. The Optiplex 745 is just 14 years old (2006). :-p

Though to me thats not the problem. What is is that I need to iterate thru
all video-modi to find out what their resolutions are (figuring out if it
actually supports text and/or graphics (with or without mouse support) is a
next step), and now have a 'puter/BIOS which just crashes on something that
basic. :-(

That the returned video modi are not actually supported by the same BIOS /
INT 10h (trashed text, no pixel plot) is yet another problem. :-((

> Have you tried running the test from pure DOS?

Not on the XP machine (the partitions are too big for true DOS).

> I suggest you check the video BIOS. e.g. with DEBUG command:

Below are the strings that I found :

0000:0010 30 30 9C 18 E9 8D 17 00 40 00 B0 0A 30 30 49 42 '00..é...@.°.00IB'
0000:0020 4D 20 56 47 41 20 43 6F 6D 70 61 74 69 62 6C 65 'M VGA Compatible'
0000:0030 20 42 49 4F 53 2E 20 03 5A 00 6A 00 78 00 8B C0 ' BIOS. .Z.j.x..À'
...
0000:0AB0 24 56 42 54 20 42 52 4F 41 44 57 41 54 45 52 2D '$VBT BROADWATER-'
0000:0AC0 47 20 20 20 64 00 30 00 37 07 81 00 30 00 00 00 'G d.0.7...0...'
0000:0AD0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 '................'
0000:0AE0 42 49 4F 53 5F 44 41 54 41 5F 42 4C 4F 43 4B 20 'BIOS_DATA_BLOCK '
...
0000:0B90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43 6F '..............Co'
0000:0BA0 70 79 72 69 67 68 74 20 28 43 29 20 32 30 30 30 'pyright (C) 2000'
0000:0BB0 2D 32 30 30 33 20 49 6E 74 65 6C 20 43 6F 72 70 '-2003 Intel Corp'
0000:0BC0 2E 20 41 6C 6C 20 52 69 67 68 74 73 20 52 65 73 '. All Rights Res'
0000:0BD0 65 72 76 65 64 2E 0D 0A 0D 0A 00 00 C0 03 08 04 'erved.......À...'
...
0000:0F90 00 00 00 00 00 00 00 00 0B A6 00 21 30 00 52 60 '.........¦.!0.R`'
0000:0FA0 53 49 2D 31 33 36 32 2D 41 00 00 00 01 05 70 1D 'SI-1362-A.....p.'
...
0000:5390 49 6E 74 65 6C 28 72 29 42 72 6F 61 64 77 61 74 'Intel(r)Broadwat'
0000:53A0 65 72 2D 47 20 47 72 61 70 68 69 63 73 20 43 68 'er-G Graphics Ch'
0000:53B0 69 70 20 41 63 63 65 6C 65 72 61 74 65 64 20 56 'ip Accelerated V'
0000:53C0 47 41 20 42 49 4F 53 00 49 6E 74 65 6C 20 43 6F 'GA BIOS.Intel Co'
0000:53D0 72 70 6F 72 61 74 69 6F 6E 00 49 6E 74 65 6C 28 'rporation.Intel('
0000:53E0 72 29 42 72 6F 61 64 77 61 74 65 72 2D 47 20 47 'r)Broadwater-G G'
0000:53F0 72 61 70 68 69 63 73 20 43 6F 6E 74 72 6F 6C 6C 'raphics Controll'
0000:5400 65 72 00 48 61 72 64 77 61 72 65 20 56 65 72 73 'er.Hardware Vers'
0000:5410 69 6F 6E 20 30 2E 30 00 60 01 61 01 62 01 63 01 'ion 0.0.`.a.b.c.'

It doesn't tell /me/ anything I can use though :-) What is it telling you
?

> And if you don't mind, share the BIOS.

I don't mind. Though I'm not so sure that putting a binary dump like the
above or base64 encoded into a newgroup message would be a good idea. So,
where (email) do you want me to send it to ? (due to JS being disabled on my
'puter it doesn't play nice with most filesharing servers. And for one-off
drops I don't like to register either)

I just tried to put the binary into the "aioe.text" newsgroup (in an attempt
to keep it outof this newsgroup), but the server rejected it with a "body to
large" remark.

Regards,
Rudy Wieser


JJ

unread,
Oct 15, 2020, 12:53:51 AM10/15/20
to
On Wed, 14 Oct 2020 10:50:42 +0200, R.Wieser wrote:
>
> Not on the XP machine (the partitions are too big for true DOS).

You can create a bootable USB thumb drive, or bootable CDROM; with DOS in
it.

The crash could be caused either by BIOS bug (in the mode changing code or
video mode data part), or Windows' VGASAVE driver (where it still can't
handle uncommon video modes to the point that they're like errorneous ones).
You'll need to debug it to find out.

> Below are the strings that I found :
>
> 0000:0010 30 30 9C 18 E9 8D 17 00 40 00 B0 0A 30 30 49 42 '00..笮.@.°.00IB'
> 0000:0020 4D 20 56 47 41 20 43 6F 6D 70 61 74 69 62 6C 65 'M VGA Compatible'
> 0000:0030 20 42 49 4F 53 2E 20 03 5A 00 6A 00 78 00 8B C0 ' BIOS. .Z.j.x..�
> ....
> 0000:0AB0 24 56 42 54 20 42 52 4F 41 44 57 41 54 45 52 2D '$VBT BROADWATER-'
> 0000:0AC0 47 20 20 20 64 00 30 00 37 07 81 00 30 00 00 00 'G d.0.7...0...'
> 0000:0AD0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 '................'
> 0000:0AE0 42 49 4F 53 5F 44 41 54 41 5F 42 4C 4F 43 4B 20 'BIOS_DATA_BLOCK '
> ....
> 0000:0B90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43 6F '..............Co'
> 0000:0BA0 70 79 72 69 67 68 74 20 28 43 29 20 32 30 30 30 'pyright (C) 2000'
> 0000:0BB0 2D 32 30 30 33 20 49 6E 74 65 6C 20 43 6F 72 70 '-2003 Intel Corp'
> 0000:0BC0 2E 20 41 6C 6C 20 52 69 67 68 74 73 20 52 65 73 '. All Rights Res'
> 0000:0BD0 65 72 76 65 64 2E 0D 0A 0D 0A 00 00 C0 03 08 04 'erved.......�..'
> ....
> 0000:0F90 00 00 00 00 00 00 00 00 0B A6 00 21 30 00 52 60 '.........¦.!0.R`'
> 0000:0FA0 53 49 2D 31 33 36 32 2D 41 00 00 00 01 05 70 1D 'SI-1362-A.....p.'
> ....
> 0000:5390 49 6E 74 65 6C 28 72 29 42 72 6F 61 64 77 61 74 'Intel(r)Broadwat'
> 0000:53A0 65 72 2D 47 20 47 72 61 70 68 69 63 73 20 43 68 'er-G Graphics Ch'
> 0000:53B0 69 70 20 41 63 63 65 6C 65 72 61 74 65 64 20 56 'ip Accelerated V'
> 0000:53C0 47 41 20 42 49 4F 53 00 49 6E 74 65 6C 20 43 6F 'GA BIOS.Intel Co'
> 0000:53D0 72 70 6F 72 61 74 69 6F 6E 00 49 6E 74 65 6C 28 'rporation.Intel('
> 0000:53E0 72 29 42 72 6F 61 64 77 61 74 65 72 2D 47 20 47 'r)Broadwater-G G'
> 0000:53F0 72 61 70 68 69 63 73 20 43 6F 6E 74 72 6F 6C 6C 'raphics Controll'
> 0000:5400 65 72 00 48 61 72 64 77 61 72 65 20 56 65 72 73 'er.Hardware Vers'
> 0000:5410 69 6F 6E 20 30 2E 30 00 60 01 61 01 62 01 63 01 'ion 0.0.`.a.b.c.'
>
> It doesn't tell /me/ anything I can use though :-) What is it telling you
> ?

Looks like the video adapter is an Intel IGP. i.e. onboard video adapter.
Presumably part of Intel's chipset.

AFAIK, Intel video adapters are known to be mediciore ones, including the
current 3D GPUs. So, I wouldn't be surprised if the hardware or its BIOS has
bugs.

> I don't mind. Though I'm not so sure that putting a binary dump like the
> above or base64 encoded into a newgroup message would be a good idea. So,
> where (email) do you want me to send it to ? (due to JS being disabled on my
> 'puter it doesn't play nice with most filesharing servers. And for one-off
> drops I don't like to register either)

I meant to share it through file sharing sites, considering that it's a
binary data. e.g. gofile.io, workuload.com, and zippyshare.com (no
registration required).

But it's no longer necessary since you've posted filtered BIOS data to
include only meaningful strings.

R.Wieser

unread,
Oct 15, 2020, 5:24:16 AM10/15/20
to
JJ,

> You can create a bootable USB thumb drive, or bootable
> CDROM; with DOS in it.

Yup. I still have a 64MByte (nope, no mistake there) USB stick here which I
put DOS 6.22 on. But as it was seen as a harddisk the write-behind was
enabled, which caused problems, which I needed to fix first ...

Under plain DOS the iterating thru video-modi 00h ... 7Fh (excuding
"special" and "reserved" modi) works alright. IOW, it looks like its XPs
lack of BIOS INT 10h support thats to blame.

> Windows' VGASAVE driver

Hmmm... not found in the c:\windows tree. But its a name I can google for.
Thanks.

> AFAIK, Intel video adapters are known to be mediciore ones, including
> the current 3D GPUs. So, I wouldn't be surprised if the hardware or its
> BIOS has bugs.

Ackk...

> But it's no longer necessary since you've posted filtered BIOS data
> to include only meaningful strings.

:-) One of the not-too-often times where second-guessing (to what the other
needs) turned out right.

Bottom line: Iterating thru the video modi will often (but not always) work
under plain DOS, but could easily create problems under console modi in
Windows. Grumble ...

Thanks for the help & info.

Regards,
Rudy Wieser


Reply all
Reply to author
Forward
0 new messages