home *** CD-ROM | disk | FTP | other *** search
- ;=============================================================================
- ; Name: Get_Rows.ASM
- ;
- ; Revised: 09/20/90 01:35pm
- ;
- ; Purpose: Returns the number of screen rows in the current screen display
- ; mode to the calling QBasic program.
- ;
- ; DECLARE this FUNCTION in your source program as follows:
- ;
- ; DECLARE FUNCTION GetScreenRows% ()
- ;
- ; This FUNCTION accepts no parms, and RETURNS an INTEGER value equal to
- ; number of rows in the current screen display mode.
- ;
- ; For a "normal" 80X25 display screen, the RETURN value = 24.
- ; For a 43 line EGA display screen, the RETURN value = 42.
- ; For a 50 line VGA display screen, the RETURN value = 49
- ;
- ;=============================================================================
-
- .MODEL MEDIUM, BASIC
- .CODE
-
- GetScreenRows PROC uses DS SI
-
- xor AX,AX ; Point to Data Segment = 0000
- mov DS,AX
- mov SI,0484h ; Hence, DS:SI = 0000:0484h
-
- xor AX,AX ; Clear out AX for the RETURN
- mov AL,[SI] ; Load AL with the appropriate value
-
- ret
-
- GetScreenRows ENDP
- END