about the code Saturday, 27-Feb-99 16:49:38 First of all,the chacksum value is a 16 bit value (is stored in AX),so you don't need a "unsigned long"(it messes up the result of the "rol" instructions).Try changing it into a "unsigned int".Second,in caveman.com only the name is used for the crc check and your program also reads in buf the length of the username.Add before fread(buf, sizeof(length),length, fp) a fseek(fp,2,0). About translating the add instruction: Try using a union (union a{int b;char c[2]}) or use inline assembly. Another thing about the program: buf is a pointer and it is not initialised.Although the program seems to work,add after "char *buf" , "buf=new char[100]" to avoid problems. L8R,Andy. Andy |
snakebyte's thread (snakebyte__@hotmail.com) (20-Feb-99 09:08:43) |