[comp.os.msdos.programmer] Setting the number on lines on the screen

flitter@atisun.dt.navy.mil (Lance Flitter) (12/13/90)

   I'm using MS-DOS 3.3 and I have VGA.  I want to set the number of
lines to 44 to make use of the Hi-Res VGA fonts.  I have used the setmode
command that came with the video adapter and this loads the proper
font but, the screen doesn't scroll properly.  The systems still seems
to be using 24 lines.  So, I'm assuming that there is a DOS call I
have to make to set the number of lines on the screen.
   Does anyone know how to do this?  Thanks.


-- 
Lance Flitter -       David Taylor Research Center, USN
flitter@dtrc.dt.navy.mil
VOICE (301) 227-3379      FAX (301) 227-5753

brs@unix.cis.pitt.edu (Brian Stupar) (12/14/90)

In article <4913@oasys.dt.navy.mil> flitter@atisun.dt.navy.mil (Lance Flitter) writes:
>
>   I'm using MS-DOS 3.3 and I have VGA.  I want to set the number of
>lines to 44 to make use of the Hi-Res VGA fonts.  I have used the setmode
>command that came with the video adapter and this loads the proper
>font but, the screen doesn't scroll properly.  The systems still seems
>to be using 24 lines.  So, I'm assuming that there is a DOS call I
>have to make to set the number of lines on the screen.
>   Does anyone know how to do this?  Thanks.
>
>
i posted more or less the same question a while back, and here's the 
response i got.  the following will make full use of the number of
lines on the screen.


---43lines.asm---


code    segment
        assume          cs:code,ds:code

        org     100h

begin:
        mov     ax,500h         ;Set the active page to 0.
        int     10h

        mov     ax,1200h        ;Request ega information.
        mov     bl,10h
        xor     cx,cx           ;CX will contain info if ega.
        int     10h

        or      cx,cx           ;cx will not be 0 if ega is present.
        jz      done            ;ega not present.

        mov     bl,30h          ;Select scan lines for alphanumeric modes.
        mov     ax,1201h        ;Set 350 scan lines.
        int     10h

        mov     ax,7            ;Assume monochrome.
        or      bh,bh           ;Monochrome color bh == 0 if color.
        jnz     label_1
        mov     al,3            ;80 X 25 color text.

label_1:
        int     10h

        mov     ax,1112h        ;Load ROM 8x8 Double Dot Font.

        mov     bl,0            ;Block 0 (destination of font).
        int     10h

;        mov     ax,1200h        ;Alternate screen routine
;        mov     bl,20h          ;Alternate print screen routine
;        int     10h

;Next find the attribute to use for clearing the screen.
        mov     dl,' '          ;Write out a byte
        mov     ah,2            ;using DOS
        int     21h

        mov     al,8            ;Now backspace
        mov     ah,14           ;Using BIOS call
        xor     bh,bh           ;Page number 0.
        int     10h

        mov     ah,8            ;Read character & attribute
        int     10h             ;using BIOS call (bh = pg)
        mov     bh,ah           ;And save attribute to clear screen.

        xor     cx,cx           ;Top row and column == 0, 0
        mov     ax,600h         ;Clear screen.
        mov     dx,(49 shl 8) + 79
        int     10h             ;Clear from top to bottom.

done:
        mov     ax,4c00h
        int     21h             ;Program terminate.

code    ends
        end        begin


---50lines.asm---

code    segment
        assume          cs:code,ds:code

        org     100h

begin:
        mov     ax,500h         ;Set the active page to 0.
        int     10h

        mov     ax,1200h        ;Request ega information.
        mov     bl,10h
        xor     cx,cx           ;CX will contain info if ega.
        int     10h

        or      cx,cx           ;cx will not be 0 if ega is present.
        jz      done            ;ega not present.

        mov     bl,30h          ;Select scan lines for alphanumeric modes.
        mov     ax,1202h        ;Set 400 scan lines.
        int     10h

        mov     ax,7            ;Assume monochrome.
        or      bh,bh           ;Monochrome color bh == 0 if color.
        jnz     label_1
        mov     al,3            ;80 X 25 color text.

label_1:
        int     10h

        mov     ax,1112h        ;Load ROM 8x8 Double Dot Font.

        mov     bl,0            ;Block 0 (destination of font).
        int     10h

;        mov     ax,1200h        ;Alternate screen routine
;        mov     bl,20h          ;Alternate print screen routine
;        int     10h

;Next find the attribute to use for clearing the screen.
        mov     dl,' '          ;Write out a byte
        mov     ah,2            ;using DOS
        int     21h

        mov     al,8            ;Now backspace
        mov     ah,14           ;Using BIOS call
        xor     bh,bh           ;Page number 0.
        int     10h

        mov     ah,8            ;Read character & attribute
        int     10h             ;using BIOS call (bh = pg)
        mov     bh,ah           ;And save attribute to clear screen.

        xor     cx,cx           ;Top row and column == 0, 0
        mov     ax,600h         ;Clear screen.
        mov     dx,(49 shl 8) + 79
        int     10h             ;Clear from top to bottom.

done:
        mov     ax,4c00h
        int     21h             ;Program terminate.

code    ends
        end        begin

---25lines.asm---

code    segment
        assume          cs:code,ds:code

        org     100h

begin:
        mov     ax,500h         ;Set the active page to 0.
        int     10h

        mov     ax,1200h        ;Request ega information.
        mov     bl,10h
        xor     cx,cx           ;CX will contain info if ega.
        int     10h

        or      cx,cx           ;cx will not be 0 if ega is present.
        jz      done            ;ega not present.

        mov     bl,30h          ;Select scan lines for alphanumeric modes.
        mov     ax,1202h        ;Set 400 scan lines.
        int     10h

        mov     ax,7            ;Assume monochrome.
        or      bh,bh           ;Monochrome color bh == 0 if color.
        jnz     label_1
        mov     al,3            ;80 X 25 color text.

label_1:
        int     10h             ;Set the mode.

;Next find the attribute to use for clearing the screen.
        mov     dl,' '          ;Write out a byte
        mov     ah,2            ;using DOS
        int     21h

        mov     al,8            ;Now backspace
        mov     ah,14           ;Using BIOS call
        xor     bh,bh           ;Page number 0.
        int     10h

        mov     ah,8            ;Read character & attribute
        int     10h             ;using BIOS call (bh = pg)
        mov     bh,ah           ;And save attribute to clear screen.

        xor     cx,cx           ;Top row and column == 0, 0
        mov     ax,600h         ;Clear screen.
        mov     dx,(49 shl 8) + 79
        int     10h             ;Clear from top to bottom.

done:
        mov     ax,4c00h
        int     21h             ;Program terminate.

code    ends
        end        begin


you might have to do some experimenting with which font is being
loaded to get 44 lines instead of 43.  the above will accomplish what
you want.



+---------------------------------------+--------------------------------------+
|  Brian R. Stupar                      |  "When things are at their darkest,  |
|  University Of Pittsburgh             |      it's a brave man who can        |
|  Computing And Information Services   |         kick back and party."        |
|  Pittsburgh, Pa. 15213	        |				       |
+---------------------------------------+--------------------------------------+
|brs@unix.cis.pitt.edu         ...!pitt!cisunx!brs           BRS@PITTVMS.BITNET|
+------------------------------------------------------------------------------+

hd7x@vax5.cit.cornell.edu (Sanjay Aiyagari) (12/14/90)

In article <4913@oasys.dt.navy.mil>,
flitter@atisun.dt.navy.mil (Lance Flitter) writes:
>
>    I'm using MS-DOS 3.3 and I have VGA.  I want to set the number of
> lines to 44 to make use of the Hi-Res VGA fonts.  I have used the setmode
> command that came with the video adapter and this loads the proper
> font but, the screen doesn't scroll properly.  The systems still seems
> to be using 24 lines.  So, I'm assuming that there is a DOS call I
> have to make to set the number of lines on the screen.
>    Does anyone know how to do this?  Thanks.

You need to use an ANSI driver that supports more than 25 lines.  Examples of
this are such drivers as ZANSI.  Or, if you don't need to use an ANSI driver,
you can remove the device=ansi.sys line from your config.sys.
Sanjay Aiyagari (hd7x@vax5.cit.cornell.edu)