In article <1995Oct17.155955.3...@gdunix.gd.chalmers.se>,

Filip Eskilsson <sa4072utb.shv.hb.se> wrote:
>Anyone got a routine to set 'modex' 320*240*256 that will work on EVERY
>gfx-card (mine only works on some)?

>Please email it to me at sa...@utb.shv.hb.se

>// Filip

This should work on every gfx card except EGA's, Monochrome, CGA's and *maybe*
true MCGA cards.  I haven't bothered to get back down to my high school
where they had a lot of PS/2's that were true MCGA cards to test it out.

procedure modex; assembler;
const CRTParams:array[1..10] of
        mov     ax, 0013h
        int     10h
        mov     dx,03c4h
        mov     ax,0604h
        out     dx,ax {disable chain4 mode}
        mov     ax,0100h
        out     dx,ax
        mov     dx,03c2h
        mov     al,0e3h
        out     dx,al

        mov     dx,03c4h
        mov     ax,0300h
        out     dx,ax

        mov     dx,03d4h
        mov     al,11h
        out     dx,al
        inc     dx
        in      al,dx
        and     al,7fh
        out     dx,al
        dec     dx
        mov     si,offset CRTParams
        mov     cx,10
@S:     lodsw
        out     dx,ax
        loop    @s

        mov     dx,03c4h
        mov     ax,0f02h
        out     dx,ax

        mov     es,Sega000
        xor     di,di
        xor     ax,ax
        mov     cx,8000h
        rep     stosw

--TCA of NewOrder
Programmer for Stranger Than Fiction Games, Inc.