Hi everyone,
I am programming for pic 16F877A in PICC. The program is writen in assembly, There is a strange that make me confused:
In order to set all pins of port B are output , I used two command:
MOVLW 0x00 // assign W=0X00
MOVWF TRISB // set all bit of trisb to zero
but when I watch in list file after compilation, a feel confused when it is like that:
MOVLW 00 // assign W=0X00
BSF 03.5 // set RP0 bit to choose bank1 contain TRISB
MOVWF 06 // Move W to f
I think it have to MOVWF 86 because 86 is address of TRISB , 06 is address of PORTB.
But my program still work exactly.
Would you help me explain why it is happen like that?
Thanks.
I am programming for pic 16F877A in PICC. The program is writen in assembly, There is a strange that make me confused:
In order to set all pins of port B are output , I used two command:
MOVLW 0x00 // assign W=0X00
MOVWF TRISB // set all bit of trisb to zero
but when I watch in list file after compilation, a feel confused when it is like that:
MOVLW 00 // assign W=0X00
BSF 03.5 // set RP0 bit to choose bank1 contain TRISB
MOVWF 06 // Move W to f
I think it have to MOVWF 86 because 86 is address of TRISB , 06 is address of PORTB.
But my program still work exactly.
Would you help me explain why it is happen like that?
Thanks.