Hi mister_e and expert person

Do you have any advise for how to optimize code to shot...

So this code we did covert form c code to basic code (me),the original code used 4 mhz work ok no flashing on display