Function 6602h Set Global Code Page

mov bx, CodePageID ;code page to set

mov ax, 6602h ;Set Global Code Page

int 21h

jc error_handler ;carry set means error

Set Global Code Page (Function 6602h) sets the code page used by all programs.

Parameter

CodePageID

Identifies the code page to set. This parameter can be set to 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

Return Value

If the function is successful, the carry flag is clear. Otherwise, the carry flag is set and the AX register contains an error value, which may be 0002h (ERROR_FILE_NOT_FOUND).

Comments

Before a code page can be selected for use on a device, the device must be prepared for code-page switching. The selected code page must be compatible with the country code specified in CONFIG.SYS. MS-DOS returns 0002h (ERROR_FILE_NOT_FOUND) if it cannot read the COUNTRY.SYS file or another specified country-information file.

See Also

Function 6601h Get Global Code Page