Function 6507h Get Double-Byte Character Set

mov bx, CodePageID ;code page to return DBCS for

mov cx, 5 ;size of buffer (must be at least 5)

mov dx, CountryCode ;country code to return DBCS for

mov di, seg DBCS

mov es, di

mov di, offset DBCS ;es:di points to buffer for pointer to DBCS

mov ax, 6507h ;Get Double-Byte Character Set

int 21h

jc error_handler ;carry set means error

Get Double-Byte Character Set (Function 6507h) returns the address of a buffer containing values that specify the valid ranges for lead bytes in the given double-byte character set (DBCS).

Parameters

CodePageID

Identifies the code page to return the DBCS values for. This parameter can be one of the following values:

Value Meaning

437 United States
850 Multilingual (Latin I)
852 Slavic (Latin II)
860 Portuguese
863 Canadian-French
865 Nordic

If this parameter is 0FFFFh, MS-DOS returns information for the current code page.

CountryCode

Specifies the country code to return the DBCS values for. This parameter can be one of the following values:

Value Meaning

001 United States
002 Canadian-French
003 Latin America
031 Netherlands
032 Belgium
033 France
034 Spain
036 Hungary
038 Yugoslavia
039 Italy
041 Switzerland
042 Czechoslovakia
044 United Kingdom
045 Denmark
046 Sweden
047 Norway
048 Poland
049 Germany
055 Brazil
061 International English
351 Portugal
358 Finland

If this parameter is 0FFFFh, MS-DOS returns information for the current country.

DBCS

Points to a buffer in which MS-DOS places the 8-bit identifier (07h) of the DBCS values and the 32-bit address (segment:offset) of the table. The buffer must be at least 5 bytes long.

Return Value

If the function is successful, the carry flag is clear and the 32-bit address to the DBCS values is copied to the buffer pointed to by the DBCS parameter. Otherwise, the carry flag is set and the AX register contains an error value, which may be one of the following:

Value Name

0001h ERROR_INVALID_FUNCTION
0002h ERROR_FILE_NOT_FOUND

Comments

This function returns 0001h (ERROR_INVALID_FUNCTION) if the buffer size specified in the CX register is less than 5.

This function returns 0002h (ERROR_FILE_NOT_FOUND) if MS-DOS cannot retrieve information for the specified code page and country code.

The DBCS values starts with a 16-bit value that specifies the length of the table. The remainder of the table consists of pairs of bytes with each pair specifying the low and high character values for a valid range of lead byte values.

See Also

Function 38h Get/Set Country Information
Function 6501h Get Extended Country Information
Function 6601h Get Global Code Page
Function 6602h Set Global Code Page