Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ movedata(DOS) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

memory(S)

segread(DOS)

FP_OFF(DOS)

MOVEDATA(DOS)



     MOVEDATA(DOS)            XENIX System V             MOVEDATA(DOS)



     Name
          movedata - Copies bytes from a specific address.

     Syntax
          #include <memory.h>

          void movedata (srcseg, srcoff, destseg, destoff, nbytes);
          int srcseg;
          int srcoff;
          int destseg;
          int destoff;
          unsigned nbytes;

     Description
          The movedata function copies nbytes bytes from the source
          address specified by srcseg:srcoff to the destination
          address specified by destseg:destoff.

          movedata is intended to be used to move far data in small or
          medium model programs where segment addresses of data are
          not implicitly known.  In large model programs, the memcpy
          function can be used since segment addresses are implicitly
          known.

     Return Value
          There is no error return.

     See Also
          memory(S), segread(DOS), FP_OFF(DOS)


























     Page 1                                           (printed 8/7/87)





     MOVEDATA(DOS)            XENIX System V             MOVEDATA(DOS)



     Example
          #include <memory.h> #include <dos.h>

          char far *src; char far *dest;      .       .       .  /*
          The following statement move 512 bytes of data from ** src
          to the dest.  */

          movedata(FP_SEG(src), FP_OFF(src), FP_SEG(dest),
               FP_OFF(dest, 512);

          x = -14.87654321; y = modf (x,&n);         /* y =
          -0.87654321, n = -14.0 */

     Notes
          Segment values for the srcseg and destseg arguments can be
          obtained by using either the segread function or the FP_SEG
          macro.

          movedata does not handle all cases of overlapping moves
          correctly (overlapping moves occur when part of the
          destination is the same memory area as part of the source).
          Overlapping moves are handled correctly in the memcpy
          function.

          This call must be compiled with the -dos flag.






























     Page 2                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026