Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Service 11H (decimal 17) first appeared in the EGA ROM BIOS. The many
  subservices available in service 11H were augmented and expanded in the
  PS/2 ROM BIOS to provide full support for the new video subsystems (MCGA
  and VGA) introduced with the PS/2s.

  To make sense of the many service 11H subservices, it helps to consider
  them in four groups (Figure 9-18):

  .  Subservices in the first group (subservices 00H through 04H) change the
     character set used in text modes.

  .  Subservices in the second group (subservices 10H through 14H) change
     the text-mode character set as well as the displayed height of
     text-mode characters.

  .  Subservices in the third group (subservices 20H through 24H) update
     graphics-mode character sets.

  .  The subservice in the fourth group (subservice 30H) returns information
     about the character sets currently displayed and about the character
     sets available to the ROM BIOS.

  Subservices 00H (decimal 0), 01H (decimal 1), 02H (decimal 2) and 04H
  (decimal 4) all change the character set used to display text-mode
  characters on the EGA, MCGA, or VGA. Subservices 01H, 02H, and 04H are the
  easiest to use. You need specify only which available tables in character
  generator RAM should contain the character set. Thus, for example, a call
  to service 11H with AL = 02H and BL = 00H instructs the ROM BIOS to use
  its 8 x 8 characters in the first (default) table in character generator
  RAM.

  If you want to define your own characters you need to use subservice 00H,
  as follows: Place a table of the bit patterns that define the characters
  in a buffer. Then call subservice 00H with the address of the table in
  ES:BP, the number of characters in CX, the ASCII code of the first
  character in the table in DX, and the number of bytes in each character's
  bit pattern in BH.

  Subservice 03H (decimal 3) lets you select among text-mode character sets
  once they are loaded into character generator RAM. The EGA and MCGA have
  four such tables; the VGA has eight. The value in BL specifies which one
  or two of the tables is to be used to display text-mode characters. On the
  EGA and MCGA, bits 0 and 1 of BL specify one table, and bits 2 and 3
  specify a second table. If the two bit fields specify the same table,
  that's the table that will be used for all text-mode characters.


  Subservice Number             Description
  --------------------------------------------------------------------------
  Load a text-mode character set:
  AL = 00H                      Load a user-specified character set.
  AL = 01H                      Load the ROM BIOS 8 x 14 character set.
  AL = 02H                      Load the ROM BIOS 8 x 8 character set.
  AL = 03H                      Select displayed character set.
  AL = 04H                      Load the ROM BIOS 8 x 16 character set
                                (MCGA, VGA only).

  Load a text-mode character set and adjust the displayed character height:
  AL = 10H                      Load a user-specified character set.
  AL = 11H                      Load the ROM BIOS 8 x 14 character set.
  AL = 12H                      Load the ROM BIOS 8 x 8 character set.
  AL = 14H                      Load the ROM BIOS 8 x 16 character set
                                (MCGA, VGA only).

  Load a graphics-mode character set:
  AL = 20H                      Load a CGA-compatible, user-specified
                                character set.
  AL = 21H                      Load a user-specified character set.
  AL = 22H                      Load the ROM BIOS 8 x 14 character set.
  AL = 23H                      Load the ROM BIOS 8 x 8 character set.
  AL = 24H                      Load the ROM BIOS 8 x 16 character set
                                (MCGA, VGA only).

  Get character generator information:
  AL = 30H                      Get character generator information.
  --------------------------------------------------------------------------


  Figure 9-18.  Subservices available through video BIOS service 11H.

  Subservices 10H (decimal 16), 11H (decimal 17), 12H (decimal 18), and 14H
  (decimal 20) are similar to subservices 00H, 01H, 02H, and 04H. The
  difference is that with these higher-numbered subservices, the ROM BIOS
  not only loads a character set but also adjusts the displayed character
  height appropriately. This difference is obvious if you compare the effect
  of executing subservice 02H and subservice 12H to load the ROM BIOS 8 x 8
  character set. With subservice 02H, the 8 x 8 characters are used without
  adjusting the displayed character height, so if you're in a default ROM
  BIOS text mode, you'll see 25 rows of characters. With subservice 12H, the
  ROM BIOS adjusts the displayed character height so that in a default ROM
  BIOS text mode you see 43 rows of characters on an EGA or 50 rows of
  characters on a VGA.

  Subservices 20H through 24H (decimal 32 through decimal 36) are related to
  subservices 00H through 04H in that they also load character sets into
  memory. However, this third group of subservices is designed for use only
  in graphics modes. Subservice 20H loads a CGA-compatible set of 8 x 8
  characters into RAM. To use subservice 20H, place a table containing the
  bit patterns for ASCII characters 80H through FFH into memory, and pass
  the address of this table to the ROM BIOS in registers ES:BP. Subservices
  21H through 24H are similar to subservices 00H, 01H, 02H, and 04H. Call
  them with 00H in BL, the number of displayed character rows in DL, and
  (for subservice 21H) the number of bytes in each character's bit pattern
  in CX.

  Subservice 30H (decimal 48) returns several pieces of handy information
  regarding the ROM BIOS character generator. This subservice reports the
  height of the displayed character matrix in CX and the number of the
  bottom character row in DL. For example, if you call subservice 30H in the
  default EGA text mode (80 x 25), the BIOS returns 14 in CX and 24 in DL.

  Parameter          Returns
  --------------------------------------------------------------------------
  BH = 00H           CGA-compatible 8 x 8 graphics-mode characters
                     (contents of interrupt 1FH vector)
  BH = 01H           Current graphics-mode characters (contents of
                     interrupt 43H vector)
  BH = 02H           ROM BIOS 8 x 14 characters
  BH = 03H           ROM BIOS 8 x 8 characters
  BH = 04H           Second half of ROM BIOS 8 x 8 character table
  BH = 05H           ROM BIOS 9 x 14 alternate characters
  BH = 06H           ROM BIOS 8 x 16 characters (MCGA and VGA only)
  BH = 07H           ROM BIOS 9 x 16 alternate characters (VGA only)
  --------------------------------------------------------------------------

  Figure 9-19.  Character bit pattern table addresses returned in ES:BP by
  subservice 30H of video ROM BIOS service 11H.

  Subservice 30H also returns the address of any of several bit pattern
  tables for the default ROM BIOS character sets. The value you pass in BH
  when you call this subservice determines which address the ROM BIOS
  returns in ES:BP. (See Figure 9-19.)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson