home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************/
- /* File Id. Farcopy.C */
- /* Author. Stan Milam. */
- /* Date Written. 11/01/89. */
- /* */
- /* (c) Copyright 1989-90 by Stan Milam */
- /* */
- /* Routine to copy one far memory address to a far destination */
- /* address. Very usefull in small and medium memory models. */
- /***************************************************************/
-
- void farcopy(void far *destination, void far *source, unsigned count) {
-
- char far *srce;
- char far *dest;
- unsigned lcv;
-
- dest = (char far *) destination; /* Recast void pointer so we */
- srce = (char far *) source; /* Use pointer arithmitic */
- for (lcv = 0; lcv < count; lcv++) { /* Copy for count bytes */
- *dest = *srce; /* Copy one byte */
- dest++; srce++; /* Bump pointers */
- }
- }