Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- XMS Specification (version 3.0) - <b>move extended memory block (function 0bh)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Move Extended Memory Block (Function 0Bh)

        ARGS:   AH = 0Bh
                DS:SI = Pointer to an Extended Memory Move Structure
                        (see below)

        RETS:   AX = 0001h if the move is successful,
                     0000h otherwise

        ERRS:   BL = 80h if the function is not implemented
                BL = 81h if a VDISK device is detected
                BL = 82h if an A20 error occurs
                BL = A3h if the SourceHandle is invalid
                BL = A4h if the SourceOffset is invalid
                BL = A5h if the DestHandle is invalid
                BL = A6h if the DestOffset is invalid
                BL = A7h if the Length is invalid
                BL = A8h if the move has an invalid overlap
                BL = A9h if a parity error occurs

Extended Memory Move Structure Definition:

        ExtMemMoveStruct    struc
            Length              dd  ?   ; 32-bit number of bytes to transfer
            SourceHandle        dw  ?   ; Handle of source block
            SourceOffset        dd  ?   ; 32-bit offset into source
            DestHandle          dw  ?   ; Handle of destination block
            DestOffset          dd  ?   ; 32-bit offset into destination block
        ExtMemMoveStruct    ends

This function attempts to transfer a block of data from one location to
another. It is primarily intended for moving blocks of data between
conventional memory and extended memory, however it can be used for
moving blocks within conventional memory and within extended memory.

NOTE: If SourceHandle is set to 0000h, the SourceOffset is interpreted
as a standard segment:offset air which refers to memory that is directly
accessible by the processor.  The segment:offset pair is stored in Intel
DWORD notation. The same is true for DestHandle and DestOffset.


   SourceHandle and DestHandle do not have to refer to locked memory
   blocks.
   Length must be even.
   Although not required, WORD-aligned moves can be significantly faster
   on most machines. DWORD aligned move can be even faster on 80386
   machines.
   If the source and destination blocks overlap, only forward moves
   (i.e. where the source base is less than the destination base) are
   guaranteed to work properly.
   Programs should not enable the A20 line before calling this function.
   The state of the A20 line is preserved.

This function is guaranteed to provide a reasonable number of  interrupt
windows during long transfers.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson