No Branch statements, in fact I don't remember ever using it.
ISR looks like this (should look very familiar to you, except I handled RB0 interrupt myself):
Code:
' ------[ This is the Interrupt Handler ]---------------------------------------
ClockCount: ' Note: this is being handled as an ASM interrupt
@ INT_START
'
R0save = R0 ; Save 2 PBP system vars that are used during
R1save = R1 ; the interrupt
'
IF INTCON.1 = 1 THEN 'handle portb.0 interrupt
INTCON.1 = 0 'clear portb.0 interrupt flag
@ incf _extint,f 'increment external interrupt counter
goto overextint 'skip over timer interrupt handler
ENDIF '
'
'
@ RELOAD_TIMER ; Reload TIMER1
@ incf _Ticks,f
if Ticks = 100 then
@ clrf _Ticks
@ incf _Seconds,f
SecondsChanged = 1
if Seconds = 60 then
@ clrf _Seconds
@ incf _Minutes,f
endif
if Minutes = 60 then
@ clrf _Minutes
@ incf _Hours,f
endif
if Hours = 100 then
@ clrf _Hours
endif
endif
'
overextint:
'
R1 = R1save ; Restore the PBP system vars
R0 = R0save
@ INT_RETURN ; Restore context and return from interrupt
'-----====[ END OF TMR1 Interrupt Handler ]====---------------------------------
variable blabla = 0
was asmed to clrf statements because the last time I checked,
PBP zeros variables by copying a zero value to the variable like any other value,
wasting one instruction per "variable = 0" statement.
Shouldn't thew ISR always be at 0x04 vector? shouldn't be a problem accessing PBP vars in asm there.
Bookmarks