assembler almost works, writing it in C