Int 67H [EMS 4.0] Function 57H (87) Subfunction 01H Exchange memory regions

Exchanges any two memory regions in conventional or expanded memory without disturbing the current expanded memory mapping context.

Call with:

AH = 57H

AL = 01H

DS:SI = segment:offset of buffer (see Notes)

Returns:

If function successful

AH = 00H

If function unsuccessful

AH = error code

Notes:

The format of the buffer controlling the exchange operation is the same as for Int 67H Function 57H Subfunction 00H.

An exchange of zero bytes is not an error. The maximum length of an exchange is 1 MB. If the length exceeds a single expanded memory page, consecutive expanded memory pages (as many as are required) supply or receive the data.

If the source and destination addresses overlap, the exchange is not performed and an error is returned.