Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    void movedata( unsigned int src_segment,
                   unsigned int src_offset,
                   unsigned int tgt_segment,
                   unsigned int tgt_offset,
                   size_t length );

Description:
    The movedata function copies length bytes from the far pointer
    calculated as (src_segment:src_offset) to a target location determined
    as a far pointer (tgt_segment:tgt_offset).

    Overlapping data may not be correctly copied.  When the source and
    target areas may overlap, copy the areas one character at a time.

    The function is useful to move data when the near address(es) of the
    source and/or target areas are not known.

Returns:
    No value is returned.

Example:
    #include <stdio.h>
    #include <string.h>
    #include <dos.h>

    void main()
      {
        char buffer[14] = {
            '*', 0x17, 'H', 0x17, 'e', 0x17, 'l', 0x17,
            'l', 0x17, 'o', 0x17, '*', 0x17 };

        movedata( FP_SEG( buffer ),
                  FP_OFF( buffer ),
                  0xB800,
                  0x0720,
                  14 );
      }

Classification:
    WATCOM

Systems:
    All, Netware

See Also:
    FP_SEG, FP_OFF, memcpy, segread

See Also: FP_SEG FP_OFF

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