; 80x30, Another way to set 80x30 mode  - Tenie Remmel

Ideal
Model Tiny
CodeSeg
P186
Org 100h

Proc        Prog

            mov ax,12h              ;Set video mode 12h
            int 10h

            mov dx,03C4h            ;SC port
            mov ax,0304h            ;Set text mode
            out dx,ax

            mov dl,0D4h             ;CRTC port
            mov ax,4F09h            ;Set char height
            out dx,ax
            mov ax,0D0Ah            ;Set cursor size
            out dx,ax
            mov ax,0E0Bh
            out dx,ax
            mov ax,0A317h           ;Set odd/even
            out dx,ax

            mov dl,0CEh             ;GC port
            mov ax,1005h            ;Set odd/even
            out dx,ax
            mov ax,0E06h            ;Set text mode
            out dx,ax

            mov dl,0DAh             ;Reset AC
            in al,dx
            mov dl,0C0h             ;AC port
            mov al,10h              ;Set text mode
            out dx,al
            mov al,00h
            out dx,al

            mov ax,40h              ;ES = BIOS segment
            mov es,ax

            mov [byte es:49h],3     ;Set BIOS mode 3

            mov ax,1114h            ;Load 16 point font
            int 10h

            ret                     ;Return

EndP        Prog

End Prog


