- ' Set Variables
- symbol lights = b0
- symbol lite1 = b1
- symbol lite2 = b2
- symbol outintot=b3
- ' End Variables
- ' Main Program
- start:
- gosub outin
- gosub leftright
- gosub rightleft
- goto start
- ' Sub - Routines
- leftright:
- lights = 128
- leftright1:
- gosub out_put
- if lights = 1 then fin1
- lights = lights / 2
- goto leftright1
- fin1:
- return
- rightleft:
- lights = 1
- rightleft1:
- gosub out_put
- if lights = 128 then fin2
- lights = lights * 2
- goto rightleft
- fin2:
- return
- outin:
- lite1 = 128
- lite2 = 1
- lights=lite1+lite2
- outin1:
- gosub out_put
- gosub delay
- if lights = 24 then fin3
- lite1=lite1/2
- lite2=lite2*2
- lights = lite1 or lite2
- goto outin1
- fin3:
- return
- out_put:
- pins = lights
- gosub delay
- return
- delay:
- pause 200
Untitled
Posted by Anonymous on Tue 13th Dec 2011 20:30
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
kpaste.net RSS