Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 21 - dos 2+ - get country-dependent information http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 21 - DOS 2+ - GET COUNTRY-DEPENDENT INFORMATION
        AH = 38h
--DOS 2.x--
        AL = 00h get current-country info
        DS:DX -> buffer for returned info (see below)
Return: AX = country code (MSDOS 2.11 only)
        buffer at DS:DX filled
--DOS 3+--
        AL = 00h for current country
        AL = 01h thru 0FEh for specific country with code <255
        AL = 0FFh for specific country with code >= 255
           BX = 16-bit country code
        DS:DX -> buffer for returned info (see below)
Return: CF set on error
            AX = error code (02h)
        CF clear if successful
            BX = country code
            DS:DX buffer filled
SeeAlso: AH=65h, INT 2F/AX=110Ch,1404h

Format of PCDOS 2.x country info:
Offset  Size    Description
 00h    WORD    date format  0 = USA    mm dd yy
                             1 = Europe dd mm yy
                             2 = Japan  yy mm dd
 02h    BYTE    currency symbol
 03h    BYTE    00h
 04h    BYTE    thousands separator char
 05h    BYTE    00h
 06h    BYTE    decimal separator char
 07h    BYTE    00h
 08h 24 BYTEs   reserved

Format of MSDOS 2.x, DOS 3+ country info:
Offset  Size    Description
 00h    WORD    date format (see above)
 02h  5 BYTEs   ASCIZ currency symbol string
 07h    BYTE    thousands separator char
 08h    BYTE    00h
 09h    BYTE    decimal separator char
 0Ah    BYTE    00h
 0Bh    BYTE    date separator char
 0Ch    BYTE    00h
 0Dh    BYTE    time separator char
 0Eh    BYTE    00h
 0Fh    BYTE    currency format
                bit 2 = set if currency symbol replaces decimal point
                bit 1 = number of spaces between value and currency symbol
                bit 0 = 0 if currency symbol precedes value
                        1 if currency symbol follows value
 10h    BYTE    number of digits after decimal in currency
 11h    BYTE    time format
                bit 0 = 0 if 12-hour clock
                        1 if 24-hour clock
 12h    DWORD   address of case map routine
                (FAR CALL, AL = char to map to upper case [>= 80h])
 16h    BYTE    data-list separator char
 17h    BYTE    00h
 18h 10 BYTEs   reserved

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