Back to main

 

Function 46 - Reserve / Release I / O Port Group

 

Reserved ports can be accessed directly from the application with in / out commands (recommended method) and function 43 (non-recommended method).

 

Options:

  * eax = 46 - function number

  * ebx = 0 - reserve, 1 - release

  * ecx = number of the beginning of the range of ports

  * edx = number of the end of the range of ports (inclusive)

Return value:

  * eax = 0 - successful

  * eax = 1 – error

 

Remarks:

·         In the case of port redundancy, an error is the fulfillment of one of the following conditions:

o   starting address is greater than the end;

o   The specified range contains an incorrect port number (valid - from 0 to 0xFFFF);

o   limit on the total number of reserved areas exceeded - a maximum of 255 is allowed;

o   The specified range intersects with one of the previously reserved

·         In the case of the release of ports, an attempt to free a range that was not previously completely reserved by the same function (with the same values ​​of ecx, edx) is considered an error.

·         If an error is detected (in both cases), no action is taken.

·         When loading, the system reserves the ports 0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusive).

·         When the stream ends, all ports reserved by it are automatically released.

 

Constants for registers:

  eax - SF_SET_PORTS (46)