0
movlw  0x05
movwf  0x23
movlw  B´00111000´
movwf  STATUS
bcf    TRISA,0
bcf    TRISA,1
bcf    STATUS,5
bsf    PORTA,1
movlw  0x07
movwf  0x25
movlw  0xFF
andwf  0x25,1
nop
movlw  0x0F
movwf  0x27
clrw
iorwf

Edited by Reverend Jim: Corrected code formatting

4
Contributors
3
Replies
31
Views
3 Months
Discussion Span
Last Post by xrj
0

Nothing special to comment for the code except that it is setting port RA0 as ouput in line #5, port RA1 as input in line #6. Lines #4 and line #7 make no sense because status register is destination for arithmetic results, so to read and not to write into it. Lines #11 and #12 do nothing: an andoperation between register 'w' (=0xFF) and register 25 leaves register 25 as it was.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.