home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / qb_lib / get_rows.asm < prev    next >
Encoding:
Assembly Source File  |  1990-09-20  |  1.3 KB  |  37 lines

  1. ;============================================================================= 
  2. ;       Name:   Get_Rows.ASM
  3. ;
  4. ;    Revised:   09/20/90 01:35pm
  5. ;
  6. ;    Purpose:   Returns the number of screen rows in the current screen display    
  7. ;               mode to the calling QBasic program.
  8. ;
  9. ;       DECLARE this FUNCTION in your source program as follows:
  10. ;
  11. ;       DECLARE FUNCTION GetScreenRows% ()
  12. ;
  13. ;       This FUNCTION accepts no parms, and RETURNS an INTEGER value equal to 
  14. ;       number of rows in the current screen display mode.
  15. ;
  16. ;       For a "normal" 80X25 display screen, the RETURN value = 24.
  17. ;       For a 43 line EGA display screen, the RETURN value = 42.
  18. ;       For a 50 line VGA display screen, the RETURN value = 49
  19. ;
  20. ;=============================================================================
  21.  
  22.         .MODEL MEDIUM, BASIC
  23.         .CODE
  24.  
  25. GetScreenRows   PROC    uses DS SI
  26.  
  27.         xor     AX,AX                   ; Point to Data Segment = 0000
  28.         mov     DS,AX
  29.         mov     SI,0484h                ; Hence, DS:SI = 0000:0484h        
  30.  
  31.         xor     AX,AX                   ; Clear out AX for the RETURN
  32.         mov     AL,[SI]                 ; Load AL with the appropriate value
  33.  
  34.         ret
  35.  
  36. GetScreenRows   ENDP
  37.                 END