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.
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 |
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).
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.
Function 6601h Get Global Code Page