Article View: comp.os.msdos.programmer
Article #3894Re: Setting the number on lines on the screen
From: Brian Stupar
Date: Thu, 13 Dec 1990 17:17
Date: Thu, 13 Dec 1990 17:17
222 lines
7920 bytes
7920 bytes
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|
+------------------------------------------------------------------------------+
Technical Details
Message-ID:
<70186@unix.cis.pitt.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!news.cs.indiana.edu!cs.widener.edu!dsinc!unix.cis.pitt.edu!brsReferences:
<4913@oasys.dt.navy.mil>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!news.cs.indiana.edu!cs.widener.edu!dsinc!unix.cis.pitt.edu!brs From: brs@unix.cis.pitt.edu (Brian Stupar) Newsgroups: comp.os.msdos.programmer Subject: Re: Setting the number on lines on the screen Message-ID: <70186@unix.cis.pitt.edu> Date: 13 Dec 90 17:17:39 GMT References: <4913@oasys.dt.navy.mil> Reply-To: brs@unix.cis.pitt.edu (Brian Stupar) Distribution: na Organization: Computing and Information Systems (CIS) Lines: 222