The reason it's not working is because of the step in your second loop: FOR Y=15 TO 0 STEP 1 SmileBASIC does not automatically go backwards here. Instead, it actually counts 15, 16, 17, 18... and won't end until it hits 0. The problem is, it never will, since it's counting up instead of down. Instead, you need this: FOR Y=15 TO 0 STEP -1 With a step of -1, it will subtract 1 from Y each loop.