working c and assembly code