Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LIST P=18F87J11 ;Definovani procesoru
- #include <P18F87J11.INC>
- ;******************************************************************************
- ;Konfiguracni bity
- CONFIG FOSC = HS ;High speed crystal ?
- CONFIG WDTEN = OFF ;Watchdog disabled
- CONFIG XINST = OFF ;Instruction set extension disabled
- udata_acs 0x000
- A res 1
- B res 1
- Y res 2
- i res 1
- ORG 0x0000
- GOTO Main
- Main:
- movlw b'00000000'
- movwf Y+1
- movlw b'00000000'
- movwf Y
- movf B, 0
- movwf Y
- movlw 0x08
- movwf i
- Cyklus:
- btfsc Y, 0
- goto Soucet
- goto Shifter
- Soucet:
- movf A, 0
- addwf Y+1, 1
- goto Shifter
- Shifter:
- rrcf Y+1, 1
- rrcf Y, 1
- bcf STATUS, C
- decfsz i, 1
- goto Cyklus
- Loop: goto Loop
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement