home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
SNPD9404.ZIP
/
FMEMOPS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-03
|
644b
|
27 lines
.I 10 2
#include <string.h>
#include <dos.h>
.I 19 2
typedef unsigned char FAR *FarBytePtr;
.I 21 2
movedata(FP_SEG(src), FP_OFF(src), FP_SEG(dest), FP_OFF(dest), count);
return dest;
.D 22 7
.I 33 1
FarBytePtr to = (FarBytePtr)dest, from = (FarBytePtr)src;
.I 36 12
else for (to += count, from += count; count; --count)
*--to = *--from;
return target;
}
void FAR * _fmemset(void FAR *dest, int ch, size_t count)
{
void FAR *target = dest;
FarBytePtr to = (FarBytePtr)dest;
for ( ; count; --count)
*to++ = (unsigned char) ch;
.D 37 11