2 ; Ullrich von Bassewitz, 2003-05-05
4 ; void* __fastcall__ memchr (const void* p, int c, size_t n);
18 sta ptr2+1 ; Save ones complement of n
27 ldx ptr2 ; Use X as low counter byte
36 bne L1 ; Branch always
38 L3: inc ptr2+1 ; Bump counter high byte
41 ; Not found, return NULL
46 ; Found, return pointer to char
48 found: ldx ptr1+1 ; get high byte of pointer