home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / asm / 80x0393 / vgafont.txt < prev    next >
Encoding:
Text File  |  1993-09-18  |  3.0 KB  |  80 lines

  1. (9555)  Fri 17 Sep 93 11:17a
  2. By: Ed Kowalski
  3. To: David Ruppert
  4. Re: Re: getting 80x50 text mo
  5. St:                                                                       <7147
  6. ---------------------------------------------------------------------------
  7. @EID:108c 00ca5220
  8. @MSGID: 1:140/12.9 988b420a
  9.  > Ok all you folks that are experts at text mode settings - how do I
  10.  > set 80x50 text mode
  11.  
  12. By: Ratko Tomic
  13. ---------------------------------------------------------------------------
  14.   Instead of giving you individual recepies for each case, here is a
  15.   bit more general method you can use to set number of lines on VGA.
  16.   The chart shows which vertical sizes (in text lines) are available
  17.   when you select particular ROM font and number of scan lines (SCL):
  18.  
  19.     SCL \ FONT     8x8     8x14     8x16
  20.     ------------------------------------
  21.     200            25       14       12
  22.     350            43       25       21
  23.     400            50       28       25
  24.     ------------------------------------
  25.     480            60       34       30    (not via BIOS)
  26.     ------------------------------------
  27.  
  28.    The procedure requires that you call BIOS to set number of scan
  29.    lines, then call BIOS set video mode function followed by font
  30.    selection:
  31.  
  32.    1.  Set # of scan lines:
  33.  
  34.          MOV   AX,1200h + SCL_nnn
  35.          MOV   BL,30h
  36.          INT   10h                  ;Select # of scan lines
  37.          MOV   AX,3
  38.          INT   10h                  ;Have BIOS program the value
  39.  
  40.     where SCL_nnn is:   SCL_200  =  0
  41.                         SCL_350  =  1
  42.                         SCL_400  =  2
  43.  
  44.    2. Select ROM font:
  45.  
  46.          MOV   AX,1110h + FONT_HxV
  47.          MOV   BL,0
  48.          INT   10h
  49.  
  50.    where FONT_HxV is:  FONT_8x8  =  2
  51.                        FONT_8x14 =  1
  52.                        FONT_8x16 =  4
  53.  
  54.  NOTE 1. Since 400 scan line mode is default in 25x80 text on VGA,
  55.          you need not set it when starting from DOS (it is 350 on
  56.          EGA). But you should restore 400 line mode before exiting
  57.          from your program.
  58.  
  59.  NOTE 2. Programming the 480 scan line mode is not supported by VGA
  60.          BIOS. It can be done by reprogamming vertical timing registers
  61.          in the CRTC controller (and sync polarity in Misc. Output)
  62.          to same values set by graphics mode 12h (640x480 mode).
  63.  
  64.  NOTE 3. By creating your own fonts 8xN you can produce (almost) any
  65.          number of text lines SCL/N. Combined with CRTC timing
  66.          registers you can pick many nice (Columns x Rows) numbers.
  67.  
  68.  * Richard Wilton - Programmer's Guide to PC & PS/2 Video Systems
  69.      (Microsoft Press, 1987, ISBN 1-55615-103-9)
  70.  
  71.  * Richard Ferraro - Programmer's Guide to the VGA and EGA Cards
  72.      (2nd Ed, Addison-Wesley, 1990, ISBN 0-201-57025-4)
  73.  
  74.  Origin: MSI S/W BBS-Fram. MA-(508) 875-8009-CodeRunneR-HandiWARE (322/327)
  75.  
  76. --- FD 1.99c
  77.  * Origin: Cat's Quarter -- Saskatoon - SK -- (1:140/12.9)
  78.  
  79. @PATH: 140/12 202 201 18 1 12/12 13/13 260/1
  80.