source:
buchla-68k/libsm/memsetw.c@
4b0e2ef
| Last change on this file since 4b0e2ef was c59409e, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 498 bytes | |
| Rev | Line | |
|---|---|---|
| [f40a309] | 1 | /* |
| 2 | ============================================================================= | |
| 3 | memset.c -- fill memory with short words | |
| 4 | Version 1 -- 1987-03-18 -- D.N. Lynx Crowe | |
| 5 | ||
| [5c13d64] | 6 | Set an array of n shorts starting at vp to the short s. |
| 7 | Return pointer to vp. | |
| [f40a309] | 8 | ============================================================================= |
| 9 | */ | |
| 10 | ||
| [b28a12e] | 11 | #include "ram.h" |
| [6262b5c] | 12 | |
| [c59409e] | 13 | volatile void *memsetw(volatile void *vp, uint16_t s, int16_t n) |
| [f40a309] | 14 | { |
| [c59409e] | 15 | volatile uint16_t *sp = vp; |
| [f40a309] | 16 | |
| [5c13d64] | 17 | while (--n >= 0) |
| 18 | *sp++ = s; | |
| [f40a309] | 19 | |
| [5c13d64] | 20 | return(vp); |
| [f40a309] | 21 | } |
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)