Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Programmers Reference 0.02b - <b>function 38h (56) get or set country-dependent information</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 38h (56)        Get or Set Country-Dependent Information

    DOS 2.x: Returns country-dependent information for the current
    country.

    DOS 3.x: Returns country-dependent information for the current country
    or a specified country, or sets the current country.

         Note:        The country-dependent information returned by DOS
                      2.x is different from that returned by DOS 3.x.

  --------------------------------------------------------------------------
  DOS 3

     1.  To get country-dependent information for the current country or a
         specified country:

         On entry:    AH         38h
                      AL         Country code (00h = current country)
                      BX         16-bit country code (if AL=FFh)
                      DS:DX      Pointer to a 34-byte memory buffer

         Returns:     AX         Error code, if CF (Carry Flag) is set
                      BX         Country code
                      DS:DX      Country-dependent information

    To get country-dependent information for the current country, call
    this Function with 00h in AL. To get information for another country,
    specify the appropriate country code in AL. For countries with a code
    above or equal to 255, call this Function with 0FFh in AL and the
    country code in BX.

                        Country Information table

           size         Meaning
            DW          Binary value indicating the date format
            5 DB        Currency symbol (ASCIIZ string)
            2 DB        Thousands separator (ASCIIZ string)
            2 DB        Decimal separator (ASCIIZ string)
            2 DB        Date separator (ASCIIZ string)
            2 DB        Time separator (ASCIIZ string)
            1 DB        Currency format:
                            01h = Currency symbol follows value.
                                  no spaces between symbol and value.
                            02h = Currency symbol precedes value.
                                  one space between symbol and value.
                            03h = Currency symbol follows value.
                                  one space between symbol and value.
                            04h = Currency symbol replaces decimal separator.
                                  (DOS 3.2 and above only)
            1 DB        Number of significant decimal digits in currency.
            1 DB        Time format:
                            Bit 0 = 0 for 12-hour format.
                            Bit 0 = 1 for 24-hour format.
            2 DW        Pointer to a FAR procedure that performs
                        case mapping for the specified country.
            2 DB        Data list separator (ASCIIZ string)
            5 DW        Reserved

     2.  To set the current country (DOS 3.0 and above only)

         On entry:    AH         38h
                      AL         Country code
                      BX         16-bit country code (if AL=FFh)
                      DX         FFFFh

         Returns:     AH         Error code, if CF is set

    To specify a country code larger than 254 (FDh), place FFh in AL and
    the 16-bit country code in BX.

         Notes:       The DOS case-mapping routine whose address (as
                      segment:offset) is returned with the country
                      dependent information will map character values from
                      80h to FFh to their uppercase equivalents. To use
                      this routine, first place the character to be mapped
                      to uppercase in the AL register. Then make a FAR
                      CALL to this routine.  The uppercased character will
                      be returned in the AL register.

   -------------------------------------------------------------------------
   DOS 2.10

       On entry:      AH         38h
                      AL         00h
                      DS:DX      Pointer to a 32-byte memory area

       Returns:       AX         Error code, if CF is set
                      DS:DX      Country-dependent information

    The return information at DS:DX is structured as follows:

         Bytes        Contents
           2          Date/time format (see below)
           2          Currency symbol (ASCIIZ string)
           2          Thousands separator (ASCIIZ string)
           2          Decimal separator (ASCIIZ string)
          24          Reserved

   -------------------------------------------------------------------------
    The possible date/time format values are as follows:

          00h         USA standard         h:m:s   m/d/y
          01h         Europe standard      h:m:s   d/m/y
          02h         Japan standard       h:m:s   y:m:d

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