Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <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 country codes larger
    than 254 (FDh), enter FFh in AL and the country code in BX.

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

           Bytes        Content
             2          Date format (see below)
             5          Currency symbol (ASCIIZ string)
             2          Thousands separator (ASCIIZ string)
             2          Decimal separator (ASCIIZ string)
             2          Date separator (ASCIIZ string)
             2          Time separator (ASCIIZ string)
             1          Currency format (see below)
             1          Number of significant decimal digits in currency
             1          Time format:
                            Bit 0 = 0 for 12-hour format;
                            Bit 0 = 1 for 24-hour format
             4          Pointer to a FAR procedure that performs case mapping
                        for the specified country
             2          Data list separator (ASCIIZ string)
            10          Reserved

    The possible date format values are as follows:

            00h         USA:         m d y
            01h         Europe:      d m y
            02h         Japan:       y m d

    Currency Format Field Values:

            00h         Currency symbol precedes value; no spaces between
                        symbol and  value
            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)

     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