It is obvious that it doesn't recongnize the variables and the flags that are extern of the assembly code.
I really don't understand why. In fact, both At&T and Intel syntax allow you to read variables of the C program simply writing the name of these variables.
So I don't think that I have to put something before "dataptr, "checksum", etc...
But the linker don't find these symbols.
I don't know why.