Advertisement
Guest User

Untitled

a guest
Oct 31st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list p=16f877
  2. #include p16f877.inc
  3.  
  4. varx1 EQU .0
  5. varx2 EQU .0
  6. varx3 EQU .0
  7.  
  8. SCRATCH EQU 0x20
  9. org 0x00
  10. nop
  11. goto start
  12. org 0x8
  13. start
  14. bsf STATUS,RP0
  15. movlw 0x00
  16. movwf TRISB
  17. bcf STATUS,RP0
  18. ; 2*(x1+x2+x3) or (x2+x3-1) or 12
  19.  
  20. movf varx1, W
  21. addwf varx2, 0
  22. addwf varx3, 0
  23. addwf W,0
  24. movwf varx1
  25. movf varx2, W
  26. addwf varx3,0
  27. decf W,0
  28. movwf varx2
  29. movf varx1, W
  30. iorwf varx2, 0
  31. iorwf .12,0
  32. movlw PORTB
  33. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement