Hi!
A few people and me are currently working on a very small i86-based OS just to improve our skills.
It's coded from scratch without any use of the standard c-libs. (It also lacks of a memory management...)
By now, i've got a very weired problem:
does not work. I monitored the function (which has been re-written in 20 different ways) with following result:
a vs a MATCH
b vs a -
c vs a -
The pointer of the 2nd. argument does not move. It only worked with a *(s2+i)...
I don't know why.
Does anyone have a suggestion?
Thanks in advance (and sorry for my english)
sseitz
A few people and me are currently working on a very small i86-based OS just to improve our skills.
It's coded from scratch without any use of the standard c-libs. (It also lacks of a memory management...)
By now, i've got a very weired problem:
Code:
char dummy[255]="";
char something[255]="";
int result;
...
int own_strcmp(char *s1, char *s2)
{
while (*s1 && *s2)
{
if (*s1++ != *s2++) { return 0; break; }
}
return 1;
}
...
result = own_strcmp("abc","abc");
a vs a MATCH
b vs a -
c vs a -
The pointer of the 2nd. argument does not move. It only worked with a *(s2+i)...
I don't know why.
Does anyone have a suggestion?
Thanks in advance (and sorry for my english)
sseitz