Obtains information about the specified country and/or code page.
Call with:
AH = 65H
AL = subfunction
01H = Get General Internationalization Information
02H = Get Pointer to Uppercase Table
04H = Get Pointer to Filename Uppercase Table
06H = Get Pointer to Collating Table
07H = Get Pointer to Double-Byte Character Set (DBCS)
Vector (MS-DOS versions 4.0 and later)
BX = code page of interest (-1 = active CON device)
CX = length of buffer to receive information (must be >= 5)
DX = country ID (-1 = default)
ES:DI = address of buffer to receive information
Returns:
If function successful
Carry flag = clear
and requested data placed in calling program's buffer
If function unsuccessful
Carry flag = set
AX = error code
Notes:
The information returned by this function is a superset of the information returned by Int 21H Function 38H.
This function may fail if either the country code or the code page number is invalid, or if the code page does not match the country code.
The function fails if the specified buffer length is less than five bytes. If the buffer to receive the information is at least five bytes long but is too short for the requested information, the data is truncated and no error is returned.
The format of the data returned by Subfunction 01H is:
Byte(s) Contents 00H information ID code (1) 01H—02H length of following buffer 03H—04H country ID 05H—06H code page number 07H—08H date format
0 = USA m d y 1 = Europe d m y 2 = Japan y m d
09H—0DH ASCIIZ currency symbol 0EH—0FH ASCIIZ thousands separator 10H—11H ASCIIZ decimal separator 12H—13H ASCIIZ date separator 14H—15H ASCIIZ time separator 16H currency format flags
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
17H number of digits after decimal in currency 18H time format
bit 0 = 0 if 12-hour clock = 1 if 24-hour clock
19H—1CH case-map routine call address 1DH—1EH ASCIIZ data list separator 1FH—28H reserved
The format of the data returned by Subfunctions 02H, 04H, 06H, and 07H is:
Byte(s) Contents 00H information ID code (2, 4, or 6) 01H—05H double-word pointer to table
The uppercase and filename uppercase tables are a maximum of 130 bytes long. The first two bytes contain the size of the table; the following bytes contain the uppercase equivalents, if any, for character codes 80H—FFH. The main use of these tables is to map accented or otherwise modified vowels to their plain vowel equivalents. Text translated with the help of this table can be sent to devices that do not support the IBM graphics character set, or used to create filenames that do not require a special keyboard configuration for entry.
The collating table is a maximum of 258 bytes long. The first two bytes contain the table length, and the subsequent bytes contain the values to be used for the corresponding character codes (0—FFH) during a sort operation. This table maps uppercase and lowercase ASCII characters to the same collating codes so that sorts will be case-insensitive, and it maps accented vowels to their plain vowel equivalents.
[4.0+] Subfunction 07H returns a pointer to a variable length table of that defines ranges for double-byte character set (DBCS) lead bytes. The table is terminated by a pair of zero bytes, unless it must be truncated to fit in the buffer, and has the following format:
dw length db start1,end1 db start2,end2 . . . db 0,0
For example:
dw 4
db 81h,9fh
db 0e0h,0fch
db 0,0
In some cases a truncated translation table may be presented to the program by MS-DOS. Applications should always check the length at the beginning of the table, to make sure it contains a translation code for the particular character of interest.
Examples:
Obtain the extended country information associated with the default country and code page 437.
buffer db 41 dup (0) ; receives country info
.
.
.
mov ax,6501h ; function & subfunction
mov bx,437 ; code page
mov cx,41 ; buffer length
mov dx,-1 ; default country
mov di,seg buffer ; buffer address
mov es,di
mov di,offset buffer
int 21h ; transfer to MS-DOS
jc error ; jump if function failed
.
.
.
In this case, MS-DOS filled the following extended country information into the buffer:
buffer db 1 ; info ID code
dw 38 ; length of following buffer
dw 1 ; country ID (USA)
dw 437 ; code page number
dw 0 ; date format
db '$',0,0,0,0 ; currency symbol
db ',',0 ; thousands separator
db '.',0 ; decimal separator
db '-',0 ; date separator
db ':',0 ; time separator
db 0 ; currency format flags
db 2 ; digits in currency
db 0 ; time format
dd 026ah:176ch ; case map entry point
db ',',0 ; data list separator
db 10 dup (0) ; reserved
Obtain the pointer to the uppercase table associated with the default country and code page 437.
buffer db 5 dup (0) ; receives pointer info
.
.
.
mov ax,6502h ; function number
mov bx,437 ; code page
mov cx,5 ; length of buffer
mov dx,-1 ; default country
mov di,seg buffer ; buffer address
mov es,di
mov di,offset buffer
int 21h ; transfer to MS-DOS
jc error ; jump if function failed
.
.
.
In this case, MS-DOS filled the following values into the buffer:
buffer db 2 ; info ID code
dw 0204h ; offset of uppercase table
dw 1140h ; segment of uppercase table
and the table at 1140:0204H contains the following data:
0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
1140:0200 80 00 80 9A 45 41 8E 41 8F 80 45 45 ....EA.A..EE
1140:0210 45 49 49 49 8E 8F 90 92 92 4F 99 4F 55 55 59 99 EIII.....O.OUUY.
1140:0220 9A 9B 9C 9D 9E 9F 41 49 4F 55 A5 A5 A6 A7 A8 A9 ......AIOU......
1140:0230 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 ................
1140:0240 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 ................
1140:0250 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 ................
1140:0260 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 ................
1140:0270 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 ................
1140:0280 FA FB FC FD FE FF ......