[2] Obtains internationalization information for the current country.
[3.0+] Obtains internationalization information for the current or specified country or sets the current country code.
Call with:
If getting country information (MS-DOS version 2)
AH = 38H
AL = 0 to get "current" country information
DS:DX = segment:offset of buffer for returned information
If getting country information (MS-DOS versions 3.0 and later)
AH = 38H
AL = 0 to get "current" country information
1—FEH to get information for countries with code < 255
FFH to get information for countries with code >=
255
BX = country code, if AL = FFH
DS:DX = segment:offset of buffer for returned information
If setting current country code (MS-DOS versions 3.0 and later)
AH = 38H
AL = 1—FEH country code for countries with code < 255
FFH for countries with code >= 255
BX = country code, if AL = 0FFH
DX = FFFFH
Returns:
If function successful
Carry flag = clear
and, if getting internationalization information
BX = country code
DS:DX = segment:offset of buffer holding internationalization
information
and buffer filled in as follows:
(for PC-DOS 2.0 and 2.1)
Byte(s) Contents 00H—01H date format
0 = USA m d y
1 = Europe d m y
2 = Japan y m d
02H—03H ASCIIZ currency symbol
04H—05H ASCIIZ thousands separator
06H—07H ASCIIZ decimal separator
08H—1FH reserved
(for MS-DOS versions 2.0 and later, PC-DOS versions 3.0 and later)
Byte(s) Contents 00H—01H date format
0 = USA m d y
1 = d m y
Europe
2 = Japan y m d
02H—06H ASCIIZ currency symbol string
07H—08H ASCIIZ thousands separator character
09H—0AH ASCIIZ decimal separator character
0BH—0CH ASCIIZ date separator character
0DH—0EH ASCIIZ time separator character
0FH currency format
bit 0 = 0 if currency symbol precedes value
= 1 if currency symbol follows value
bit 1 = 0 if no space between value and currency
symbol
= 1 if one space between value and
currency symbol
bit 2 = 0 if currency symbol and decimal are
separate
= 1 if currency symbol replaces decimal
separator
10H number of digits after decimal in currency
11H time format
bit 0 = 0 if 12-hour clock
= 1 if 24-hour clock
12H—15H case-map call address
16H—17H ASCIIZ data-list separator
18H—21H reserved
If function unsuccessful
Carry flag = set
AX = error code
Notes:
The default country code is determined by the COUNTRY= directive in CONFIG.SYS or by the KEYBxx keyboard driver file if one is loaded. Otherwise, the default country code is OEM-dependent.
The previous contents of register CX may be destroyed by the Get Country Information subfunction.
The case-map call address is the segment:offset of a FAR procedure that performs country-specific mapping on character values from 80H through 0FFH. The procedure must be called with the character to be mapped in register AL. If an alternate value exists for that character, it is returned in AL; otherwise, AL is unchanged. In general, lowercase characters are mapped to their uppercase equivalents, and accented or otherwise modified vowels are mapped to their plain vowel equivalents.
[3.0+] The value in register DX is used by MS-DOS to select between the Set Country and Get Country Information subfunctions.
[3.3+] Int 21H Function 65H (Get Extended Country Information) returns a superset of the information supplied by this function.
Examples:
Obtain internationalization information for the current country in the buffer ctrybuf.
ctrybuf db 34 dup (0)
.
.
.
mov ah,38h ; function number
mov al,0 ; get current country
mov dx,seg ctrybuf ; address of buffer
mov ds,dx ; for country information
mov dx,offset ctrybuf
int 21h ; transfer to MS-DOS
jc error ; jump if function failed
.
.
.
If the program is running under PC-DOS 3.3 and the current country code is 49 (West Germany), ctrybuf is filled in with the following information:
dw 0001h ; date format
db 'DM',0,0,0 ; ASCIIZ currency symbol
db '.',0 ; ASCIIZ thousands separator
db ',',0 ; ASCIIZ decimal separator
db '.',0 ; ASCIIZ date separator
db '.',0 ; ASCIIZ time separator
db 02h ; currency format
db 02h ; digits after decimal
db 01h ; time format
dd 026ah:176ch ; case-map call address
db ';',0 ; ASCIIZ data-list separator
db 10 dup (0) ; reserved