The following MS-DOS Interrupt 21h functions behave differently in protected mode than they do in real mode. To use these functions, an application might require additional code:
Function | Description |
25h | Set Interrupt Vector |
35h | Get Interrupt Vector |
38h | Get/Set Current Country Information |
4402–4405h | Send/Receive Control Data |
440Ch | Generic IOCTL for Character Devices |
6501–6506h | Get Extended Country Information |
Functions 25h and 35h set and get the protected-mode interrupt vector. They can be used to hook hardware interrupts, such as the timer or keyboard interrupt, as well as to hook software interrupts. (Except for Interrupts 23h, 24h, and 1Ch, software interrupts that are issued in real mode are not passed to protected-mode interrupt handlers. However, all hardware interrupts are passed to protected-mode interrupt handlers before being passed to real mode).
Function 38h returns a 34-byte buffer containing a doubleword real-mode address. The address at offset 12h is used for case mapping. To call the case-mapping function, use the DPMI translation function to simulate a real-mode FAR call.
Functions 4402h, 4403h, 4404h, and 4405h are used to receive data from a device or send data to a device. Because it is not possible to break the transfers automatically into small pieces, the calling program should assume that a transfer of greater than 4K will fail unless the address of the buffer is in the low 1 megabyte.
Only certain extensions of Function 440Ch (Minor Codes 45h and 65h) are supported for protected mode. The extensions of Function 440Ch that are used for code-page switching (Minor Codes 4Ah, 4Ch, 4Dh, 6Ah, and 6Bh) are not supported for protected-mode programs. To use 440Ch to switch code pages, you must use the DPMI translation functions.
Functions 6501h, 6502h, 6503h, 6504h, 6505h, and 6506h are supported for
protected-mode programs. However, all doubleword parameters returned will
contain real-mode addresses (that is, the case-conversion procedure address and
all the pointers to tables will contain real-mode segment:offset addresses). To call the case-conversion procedure in real mode, you must use the DPMI translation functions.