RST code 0x0
GOTO Start ; After reset, start in main function
ORG 4
BTFSC INTCON,1 ; Check interruption by INT
GOTO InterrupcionINT ; If it is enabled. Interruption by INT
; It is not activated. Check another interrupt
BTFSS V_ESTADO_LAVACAR,7 ; Check if the washing machine's status is on
GOTO DescartarInterrupcao ; It is not activated. Other interruptions not performed
; If it is enabled. Compare other interruptions
BTFSC INTCON,0 ; Check Interruption by BI
GOTO InterrupcionRBI ; If it is enabled. Interruption by RBI
GOTO InterrupcionTMR0 ; It is not activated. Interruption by TMR0
DescartarInterrupcao
BTFSS PORTB,4 ; We eliminated the mismatch condition to be able to erase the RBI pin
nop
BCF INTCON, RBIF ; Erases the interruption by RBI
BCF INTCON, T0IF ; Erases the interruption by TMR0
RETFIE
PGM code
Start