mov bx, Handle ;handle of device
mov ch, Category ;device category
mov cl, 6Bh ;Query Code-Page Prepare List
mov dx, seg ListIDs
mov ds, dx
mov dx, offset ListIDs ;ds:dx points to CPLIST structure
mov ax, 440Ch ;IOCTL for Character Device
int 21h
jc error_handler ;carry set means error
Query Code Page Prepare List (Function 440Ch Minor Code 6Bh) returns the list of currently prepared code pages for the specified device.
Handle
Identifies the device to return the code-page list for.
Category
Specifies the type of device. This parameter must be one of the following values:
Value | Device |
01h | Serial device |
03h | Console (screen) |
05h | Parallel printer |
ListIDs
Points to a CPLIST structure that receives the list of prepared code pages. The CPLIST structure has the following form:
CPLIST STRUC
cplLength dw ((HARDWARE_IDS+1)+(PREPARED_IDS+1))*2
;structure length, in bytes,
;excluding this field
cplHIds dw HARDWARE_IDS ;number of hardware code pages
cplHid dw HARDWARE_IDS dup(?) ;array of hardware code pages
cplPIds dw PREPARED_IDS ;number of prepared code pages
cplPid dw PREPARED_IDS dup(?) ;array of prepared code pages
CPLIST ENDS
For a full description of the CPLIST structure, see Chapter 6, “National Language Support.”
If the function is successful, the carry flag is clear. Otherwise, the carry flag is set.
The device driver may return up to 12 hardware code-page identifiers and 12 prepared code-page identifiers.
Function 440Ch Minor Code 4Ah Select Code Page
Function 440Ch Minor Code 4Ch Start Code-Page Prepare
Function 440Ch Minor Code 4Dh End Code-Page Prepare
Function 440Ch Minor Code 6Ah Query Selected Code Page