Function 46 - reserve/free a group of input/output ports.
To work with reserved ports an application can access directly by
commands in/out (recommended way) and can use function 43
(not recommended way).
Parameters:
- eax = 46 - function number
- ebx = 0 - reserve, 1 - free
- ecx = start port number
- edx = end port number (inclusive)
Returned value:
- eax = 0 - success
- eax = 1 - error
Remarks:
- For ports reservation: an error occurs if and only if
one from the following condition satisfies:
- start port is more than end port;
- the selected range contains incorrect port number
(correct are from 0 to 0xFFFF);
- limit for the total number of reserved areas is exceeded
(maximum 255 are allowed);
- the selected range intersects with any of earlier reserved
- For ports free: an error is an attempt to free range,
that was not earlier reserved by this function
(with same ecx,edx).
- If an error occurs (for both cases) function performs no action.
- At booting the system reserves for itself ports
0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively).
- When a thread terminates, all reserved by it ports
are freed automatically.