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]

  In DOS version 4, interrupt 21H, function 65H (decimal 101) supports
  subfunction 07H, which returns the segmented address of a DBCS vector, a
  table of byte pairs that can be used to translate characters in non-ASCII
  character sets that represent each character with 2 bytes instead of one.
  Each byte pair indicates a range of values. The values in each range do
  not, themselves, represent individual characters; instead, each value
  identifies the lead byte of a 2-byte character code.

  This support for double-byte characters is useful only in foreign-language
  DOS releases where the usual extended ASCII character set is inadequate.
  But if you want to experiment, here's how interrupt 21H, function 65H
  gives you access to the DBCS vector in DOS version 4.

  Call this function with the register values shown in Figure D-2.
  Subfunction 07H updates the buffer at ES:DI with a subfunction ID byte
  (07H) followed by the segmented address of the byte-pair table. The table
  consists of a single word containing the number of entries in the table,
  followed by a sequence of byte-pairs. For example, in a DOS version 4
  system installed with COUNTRY = 81 (Japan) in its CONFIG.SYS file,
  subfunction 07H returns a pointer to the following table:

  +---------------------------------------+
  | 06 | 00 | 81 | 9F | E0 | FC | 00 | 00 |
  +---------------------------------------+

  The first 2 bytes of the table indicate its length (6 bytes). The next two
  pairs of bytes indicate that each value in the range 81H-9FH and EDH-FCH
  represents the lead byte of a 2-byte character code. The table ends with a
  pair of zero bytes.

  Call with                            Returns
  --------------------------------------------------------------------------
  AH = 65H                             If error:
  AL = 07H                             CF set
  BX = code page number                AX = error code
  (-1 = default)                       If no error:
  CX = buffer length (should be 05H)   CF clear
  DX = country ID (-1 = default)       ES:DI -> extended country
                                       ES:DI -> empty buffer
                                       information
  --------------------------------------------------------------------------

  Figure D-2.  Registers used for interrupt 21H, function 65H, subfunction
  07H.

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