CX51 not support strtoul library routine ! unsigned long x; unsigned char c[]="12345678" x = strtoul (c,NULL,10); returned zero ?
If you select device P89C669 or other MX , this code not working (return FF..), If select no MX device working correctly !! #include <REG51M.H> #include <string.h> #include <stdlib.h> void main (void) { unsigned long v; unsigned char x[]="12345678"; while (1) { v=strtoul("1234",NULL,10); } }