Em 07/12/2014 03:06, escreveu: > > I seem to be finding conflicting definitions of strchr > > strcat(2) > char* strchr(char *s, char c) > > /sys/src/libc/port/strchr.c > char* strchr(char *s, int c) > > /sys/include/libc.h:/strchr/ > extern char* strchr(char*, int); > > So it seems like it takes an int, rather than a char. > But referencing the 386 asm, this is seen. > /sys/src/libc/386/strchr.s:4: MOVB c+4(FP), AX > (^ Why a 16-bit register?) > Is there a reason for these seemingly divergent definitions? The 386 assembler does not do 16 bit, i.e. AX there is 32 bits long.