I converted some of it to assembly for FDOSTUI:

http://bzr.savannah.gnu.org/lh/fdostui/v1/view/head:/src/dos16/video.asm

The EGA test is:

detect_ega:

    ; get EGA info
    ; returns:
    ; bh video state
    ;   00h color mode in effect
    ;   01h mono mode in effect
    ; bl installed memory
    ;   00h 64K
    ;   01h 128K
    ;   02h 192K
    ;   03h 256K
    ; ch feature connector bits
    ; cl switch settings
    mov ax, 1200h
    mov bl, 10h
    int 10h
    cmp bh, 10h ; ? not sure if this is correct
    jne detect_cga
    mov ax, VIDEO_CARD_EGA
    jmp detect_exit

I have a remark there but never researched it.




On Mon, Jul 16, 2018 at 1:35 PM, David McMackins <cont...@mcmackins.org>
wrote:

> I was replying to Jerome who is the original author of the Pascal one.
>
> I get that VGA is widely available. I'm writing a library, so I want to
> support as much as possible. My intended targets (in the order of planned
> implementation) are VGA, VESA, CGA, and EGA. I want to have contained tests
> for each of them (and separate for different VESA modes, but I already have
> a document on doing that) so that an application could list to the user all
> the supported modes for their hardware.
>
>
> Happy Hacking,
>
> David E. McMackins II
> Supporting Member, Electronic Frontier Foundation (#2296972)
> Associate Member, Free Software Foundation (#12889)
>
> www.mcmackins.org www.delwink.com
> www.eff.org www.gnu.org www.fsf.org
>
> On 2018-07-16 13:52, Eric Auer wrote:
>
>> Hi David,
>>
>> The EGA check does not come back positive on my VGA machine.
>>> Is this expected?
>>>
>>
>> We suggested several: Do you mean the Pascal one suggested
>> by Mark, the PC Mag one suggested by Mateusz, or the ones
>> suggested by me? If all of them, then I would say NO, this
>> is not expected. If SOME of them, then I suggest that you
>> simply use those which work ;-)
>>
>> Also, I think it is sufficient to have a good VGA test:
>>
>> Only weird people like me still have EGA boards in some
>> dusty cardboard boxes. So you could say "either use VGA
>> or fall back to text mode" without risking much harm ;-)
>>
>> Regards, Eric
>>
>> PS: Does anybody know a computer museum? I know people with
>> way more exotic stuff who would be interested to SELL some!
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Freedos-devel mailing list
>> Freedos-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to