void setColorAutoDisable() { if(memchr8((void*)0xC000, 0xFB, 16) == 0) { asm { MVI A, 0C9h STA setColor } } }
void *memchr (const void *s, uint8_t c, size_t n) { switch ((n < sizeof(unsigned long)) ? n : sizeof(unsigned long)) { case 8: return(memchr64(s, c, n)); case 4: return(memchr32(s, c, n)); case 2: return(memchr16(s, c, n)); } return(memchr8(s, c, n)); }