Advertisement
kneefer

smiw - 8051

Nov 26th, 2014
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     org 0
  2.     mov p3, #00h
  3. reset:
  4.     mov p3, #FEh
  5. start:
  6.     jb p1.0, moveBit
  7.     sjmp start
  8.  
  9. moveBit:
  10.     jb p1.1, moveRight
  11.     sjmp moveLeft
  12.  
  13. moveRight:
  14.     mov A, p3
  15.     rr A
  16.     mov p3, A
  17.     sjmp start
  18.    
  19.  
  20. moveLeft:
  21.     mov A, p3
  22.     rl A
  23.     mov p3, A
  24.     sjmp start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement