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]

  Function 65H (decimal 101) was introduced in DOS version 3.3 along with
  support for global code pages (user-configurable character sets for output
  devices). It returns a superset of the country information available
  through function 38H. Function 65H has subfunctions, each of which
  returns a different type of information. (See Figure 17-23.)

  Call function 65H with a subfunction number in AL, a code page number in
  BX, a buffer size in CX, a country ID in DX, and the address of an empty
  buffer in ES:DI. Calls with BX = -1 refer to the active code page; calls
  with DX = -1 return information for the default country ID.

  The size of the buffer you supply to this function depends on which
  subfunction you call. The function clears the carry flag and fills the
  buffer with the information you requested.

  Subfunction
  Hex     Dec    Description
  --------------------------------------------------------------------------
  01H     1      Get extended country information.
  02H     2      Get pointer to character translation table.
  04H     4      Get pointer to filename character translation table.
  05H     5      (Reserved)
  06H     6      Get pointer to collating sequence.
  --------------------------------------------------------------------------

  Figure 17-23.  Subfunctions available through interrupt 21H, function 65H.

  Subfunction 01H. This subfunction returns the same information as function
  38H, but also includes the current code page and country ID (Figure
  17-24).

   Offset         Size
  Hex     Dec     (bytes)  Description
  --------------------------------------------------------------------------
  00H      0       1       Subfunction ID (always 01H)
  01H      1       2       Size of following information (38 bytes or less)
  03H      3       2       Country ID
  05H      5       2       Code page
  07H      7       2       Date format
  09H      9       5       Currency symbol string (ASCIIZ format)
  0EH     14       2       Thousands separator string (ASCIIZ format)
  10H     16       2       Decimal separator string (ASCIIZ format)
  12H     18       2       Date separator string (ASCIIZ format)
  14H     20       2       Time separator string (ASCIIZ format)
  16H     22       1       Currency symbol location
  17H     23       1       Currency decimal places
  18H     24       1       Time format
  19H     25       4       Extended ASCII map call address
  1DH     29       2       List separator string (ASCIIZ format)
  1FH     31      10       (Reserved)
  --------------------------------------------------------------------------

  Figure 17-24.  Format of extended country information returned by function
  65H, subfunction 01H. The information starting at offset 7 is the same as
  that returned by interrupt 21H, function 38H.

  Subfunction 02H. This subfunction returns 5 bytes of data in the buffer at
  ES:DI. The first byte always has the value 02H (the subfunction number).
  The 4 remaining bytes contain the segmented address of a translation table
  used to convert extended ASCII characters (ASCII codes 80H through FFH) to
  characters with ASCII codes 00H through FFH. This table is used by the
  character-mapping routine whose address is returned by subfunction 01H.

  Subfunction 04H. This subfunction also fills the buffer at ES:DI with a
  single subfunction ID byte followed by the 4-byte segmented address of a
  translation table. This table serves the same purpose as the table whose
  address is returned by subfunction 02H, but this table is used for
  filenames.

  Subfunction 06H. Like subfunctions 02H and 04H, this subfunction fills the
  buffer at ES:DI with a subfunction ID byte followed by a segmented
  address. In this case, the address points to a table that specifies the
  collating sequence for the character set defined in the code page.

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