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
movlw  0x0F
movwf  0x27

Recommended Answers

All 3 Replies

Suspect you're usig a PIC microcontroller.
More explanation would help.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.