org 0 ;reset vector to origin 0
bsf STATUS,5 ;go to BANK 1
movlw PORT_RA ;set RA2 and RA3 as input movwf TRISA ;move 04h to TRISA
movlw PORT_RB ;set all RB ports as output movwf TRISB ;move to TRISB
bcf STATUS,5 ;back to BANK 0
there are 2 error in the BOLD.
Message[302] C:\PROJECTS\16F84ATMPO.ASM 101 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROJECTS\16F84ATMPO.ASM 103 : Register in operand not in bank 0. Ensure that bank bits are correct.
It may be because your code overwrites Interrupt Vector location 0x0004. Use a GOTO in the beginning like this or show us your full code. May be its something else.
Code:
org 0x0000 ;reset vector to origin 0
goto main
org 0x0020
main
bsf STATUS,5 ;go to BANK 1
movlw PORT_RA ;set RA2 and RA3 as input
movwf TRISA ;move 04h to TRISA
movlw PORT_RB ;set all RB ports as output
movwf TRISB ;move to TRISB
bcf STATUS,5 ;back to BANK 0