mov ax, 6601h ;Get Global Code Page
int 21h
jc error_handler ;carry set means error
mov UserCodePageID, bx ;user code page
mov SysCodePageID, dx ;system code page
Get Global Code Page (Function 6601h) identifies the code page currently used by all programs.
This function has no parameters.
If the function is successful, the carry flag is clear, the BX register contains the active code page (the code page set by the user), and the DX register contains the number of the system code page (the code page specified at startup). Otherwise, the carry flag is set and the AX register contains an error value, which may be 0002h (ERROR_FILE_NOT_FOUND).
The code-page identifier can be one of the following:
Value | Meaning |
437 | United States |
850 | Multilingual (Latin I) |
852 | Slavic (Latin II) |
860 | Portuguese |
863 | Canadian-French |
865 | Nordic |
Function 6602h Set Global Code Page