/* returns the address of the first occurrence of  */
void* memscan(void *s, int c, size_t n)
/* returns the address of the first occurrence of  */
void* memscan(void *s, int c, size_t n)
{
	register int r0 asm("0") = (char) c;
	const void *ret = s + n;
	asm volatile ("0: srst  %0,%1\n"
		      "   jo    0b\n"
		      : "+a" (ret), "+&a" (s) : "d" (r0) : "cc" );
	return (void *) ret;
}