SHARE
TWEET

Untitled

a guest Mar 14th, 2019 161 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $regfile = "m8def.dat"
  2. $crystal = 4000000
  3. $hwstack = 40
  4. $swstack = 16
  5. $framesize = 32
  6.  
  7. Config Portb.1 = Input
  8. Config Portb.2 = Input
  9.  
  10. Portb.1 = 1
  11. Portb.2 = 1
  12.  
  13.  
  14. Config Portd = Output
  15. Config Portc = Output
  16. Dim I As Byte
  17. Dim K As Byte
  18. Dim F As Byte
  19. Dim X As Integer
  20. X = 100
  21.  
  22.  
  23. Do
  24.  
  25.  
  26. If Pinb.1 = 0 Then F = 1
  27. If Pinb.2 = 0 Then
  28. Pinb.1 = 1
  29.  
  30. End If
  31.  
  32. If F = 1 Then
  33.  
  34. For I = 0 To 7 Step 1
  35.         Portd.i = 1
  36.         Waitms X
  37.             For K = I To 7 Step 1
  38.             If Pinb.2 = 0 Then Goto Lin
  39.             Portd.k = 1
  40.             Waitms X
  41.             Portd.k = 0
  42.             Next
  43.        Portd.i = 1
  44.         Waitms X
  45.         Next
  46.         X = X + 200
  47.         If X = 500 Then X = X - 400
  48. End If
  49.  
  50. Lin:
  51. If Pinb.2 = 0 Then
  52.    For I = 7 To 0 Step -1
  53.    Portd.i = 0
  54.    Waitms 300
  55.    F = 0
  56.    Next
  57. End If
  58. Loop
  59. End
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top