Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list p=16f877
- #include p16f877.inc
- varx1 EQU .0
- varx2 EQU .0
- varx3 EQU .0
- SCRATCH EQU 0x20
- org 0x00
- nop
- goto start
- org 0x8
- start
- bsf STATUS,RP0
- movlw 0x00
- movwf TRISB
- bcf STATUS,RP0
- ; 2*(x1+x2+x3) or (x2+x3-1) or 12
- movf varx1, W
- addwf varx2, 0
- addwf varx3, 0
- addwf W,0
- movwf varx1
- movf varx2, W
- addwf varx3,0
- decf W,0
- movwf varx2
- movf varx1, W
- iorwf varx2, 0
- iorwf .12,0
- movlw PORTB
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement