Something like this perhaps?
Code:Cnt VAR BYTE Dir VAR BIT UP CON 1 DOWN CON 0 SomeLoop: ' Monitor keypress ' Update Display ' etc IF Dir = UP THEN Cnt = Cnt + 1 ELSE Cnt = Cnt - 1 ENDIF IF (Cnt = 100) OR (Cnt = 0) THEN Dir = ~Dir ' Invert direction ENDIF Goto SomeLoop
Bookmarks