'**************************************************************** '* Name : chap6code.BAS * '* Author : Chuck Hellebuyck * '* Notice : Copyright (c) 2005 Electronic Products * '* : All Rights Reserved * '* Date : 3/31/05 * '* Version : 1.0 * '* Notes : Scroll 8 LEDs * '* : * '**************************************************************** ' *** Program Variables *** x var byte ' FOR-NEXT loop variable defined ' *** Main program loop *** Main: ' Main loop label for x = 8 to 15 ' Loop 8 times thru code high x ' Turn on next LED pause 10 ' Delay 10 milliseconds low x ' Turn off LED pause 10 ' Delay 10 milliseconds next ' Is x = 7 yet? for x = 15 to 8 step -1 ' Loop 8 times in negative direction high x ' Turn next LED on pause 10 ' Pause 10 milliseconds low x ' Turn off LED pause 10 ' Pause 10 milliseconds next ' Is x = 0 yet? goto main ' Jump to main and do it again end ' Stop if the program gets here