Replaced #DELAY with explicit clock cycle calls.

Does not break CPU. i variable correctly written in code_gen, but s
variable is not.