pastebin - collaborative debugging tool
kpaste.net RSS


Untitled
Posted by Anonymous on Tue 13th Dec 2011 20:30
raw | new post

  1. ' Set Variables
  2. symbol lights = b0
  3. symbol lite1 = b1
  4. symbol lite2 = b2
  5. symbol outintot=b3
  6. ' End Variables
  7.  
  8. ' Main Program
  9.  
  10. start:
  11.         gosub outin
  12.         gosub leftright
  13.         gosub rightleft
  14.         goto start
  15.        
  16. ' Sub - Routines
  17.  
  18. leftright:
  19.         lights = 128
  20.        
  21. leftright1:
  22.         gosub out_put
  23.         if lights = 1 then fin1
  24.         lights = lights / 2
  25.         goto leftright1
  26.  
  27. fin1:
  28.         return
  29.        
  30. rightleft:
  31.         lights = 1
  32.        
  33. rightleft1:
  34.         gosub out_put
  35.         if lights = 128 then fin2
  36.         lights = lights * 2
  37.         goto rightleft
  38.  
  39. fin2:
  40.         return
  41.        
  42. outin:
  43.         lite1 = 128
  44.         lite2 = 1
  45.         lights=lite1+lite2
  46.        
  47. outin1:
  48.         gosub out_put
  49.         gosub delay
  50.         if lights = 24 then fin3
  51.         lite1=lite1/2
  52.         lite2=lite2*2
  53.         lights = lite1 or lite2
  54.         goto outin1
  55.  
  56. fin3:
  57.         return
  58.        
  59. out_put:
  60.         pins = lights
  61.         gosub delay
  62.         return
  63.  
  64. delay:
  65.         pause 200

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at