Memsetw
Re:Memsetw
Well... here's the beginning of it:
memsetw(void *dest, u_short w, u_long n);
Basically, just loop w number of times, writing the value in n to *dest(adding 2 each loop to *dest).
If you really, really need the actual code for the function, I can post it, but I think you ought to be able to code it with that info.
K.J.
memsetw(void *dest, u_short w, u_long n);
Basically, just loop w number of times, writing the value in n to *dest(adding 2 each loop to *dest).
If you really, really need the actual code for the function, I can post it, but I think you ought to be able to code it with that info.
K.J.
Re:Memsetw
memsetw is just a wide version of memset. looks like a multibyte/unicode type version.
-- Stu --
Re:Memsetw
The wide character version of memset would be wmemset(void *, wchar_t, size_t). But if sizeof(wchar_t)==sizeof(unsigned short) then it's the same thing.
Re:Memsetw
I think:
Code: Select all
void memsetw(void *s, int c, unsigned int n)
{
__asm__ __volatile__
("cld\n\t"
"rep\n\t"
"stosw": : "c" (n), "a" (c), "D" (s));
}