source:
buchla-68k/libsm/memcpyw.c@
d6f9ed1
| Last change on this file since d6f9ed1 was b28a12e, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 466 bytes | |
| Rev | Line | |
|---|---|---|
| [f40a309] | 1 | /* |
| 2 | ============================================================================= | |
| 3 | memcpyw.c -- copy words | |
| 4 | Version 2 -- 1987-06-15 -- D.N. Lynx Crowe | |
| 5 | ||
| [5c13d64] | 6 | Copy vp2 to vp1, always copy n words. |
| 7 | Return pointer to vp1. | |
| [f40a309] | 8 | ============================================================================= |
| 9 | */ | |
| 10 | ||
| [b28a12e] | 11 | #include "ram.h" |
| [6262b5c] | 12 | |
| [7258c6a] | 13 | void *memcpyw(void *vp1, void *vp2, int16_t n) |
| [f40a309] | 14 | { |
| [7258c6a] | 15 | int16_t *sp1 = vp1; |
| 16 | int16_t *sp2 = vp2; | |
| [f40a309] | 17 | |
| [5c13d64] | 18 | while (--n >= 0) |
| 19 | *sp1++ = *sp2++; | |
| 20 | ||
| 21 | return(vp1); | |
| [f40a309] | 22 | } |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](http://bob.lopatic.de/chrome/site/logo.png)