mov bx, CodePageID ;code page to return sequence for
mov cx, 5 ;size of buffer (must be at least 5)
mov dx, CountryCode ;country code to return sequence for
mov di, seg Table
mov es, si
mov di, offset Table ;es:di points to buffer for ptr to sequence
mov ax, 6505h ;Get Filename-Character Table
int 21h
jc error_handler ;carry set means error
Get Filename-Character Table (Function 6506h) returns the address of the filename-character table for the specified code page and country code. This table specifies which characters must not be used in filenames.
CodePageID
Identifies the code page to return the filename-character table 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 filename-character table 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 the table for the current country.
Table
Points to a buffer in which MS-DOS places the 8-bit identifier (05h) of the filename-character table and the 32-bit address (segment:offset) of the table. The buffer must be at least 5 bytes long.
If the function is successful, the carry flag is clear and the 32-bit address of the filename-character table is copied to the buffer pointed to by the Table 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 |
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 country information for the specified code page and country code.
The filename-character table starts with a 16-bit value that specifies the length of the table.
Function 38h Get/Set Country Information
Function 6501h Get Extended Country Information
Function 6601h Get Global Code Page
Function 6602h Set Global Code Page