Author: sebastien.lelong
Date: Tue Dec 30 22:43:59 2008
New Revision: 681
Modified:
trunk/unvalidated/include/jal/rtc_isr_tmr0.jal
Log:
this one too is not correctly indented
Modified: trunk/unvalidated/include/jal/rtc_isr_tmr0.jal
==============================================================================
--- trunk/unvalidated/include/jal/rtc_isr_tmr0.jal (original)
+++ trunk/unvalidated/include/jal/rtc_isr_tmr0.jal Tue Dec 30 22:43:59 2008
@@ -44,35 +44,35 @@
var volatile byte bres_lo = lo
procedure RTC() is
-pragma interrupt
-assembler -- ISR should be as small as possible, so assembler
-local int_exit -- labels for jumping
-
- bcf INTCON_TMR0IF -- clear the timer 0 interrupt flag
- movf bres_mid,f -- mid == 0 ?
- btfsc STATUS_Z -- not zero?
- decf bres_hi, f -- zero, borrow one from high byte
- decfsz bres_mid, f -- this is the count of the interrupts
- goto int_exit -- mid byte is not zero, so exit
- movf bres_hi, f -- mid == 0, might hi == 0 too ?
- btfss STATUS_Z
- goto int_exit -- high byte not zero, so exit
- -- high byte zero, mid also zero
- -- we need to load the one-second timer
-
- movlw hi -- add 2 000 000 to hi-mid-lo
- movwf bres_hi -- hi & mid are both zero
- movlw mid
- movwf bres_mid
- movlw lo -- lo is not zero, and must be added
- addwf bres_lo, f -- bres_lo can overflow
- btfsc STATUS_C -- does it?
- incf bres_mid, f -- yes, but mid was 0x4B, so will not overflow
- incf seconds, f -- main routine should check seconds
- -- and call calendar when seconds > 59
- -- and take care of minutes, etc.
-int_exit:
-end assembler
+ pragma interrupt
+ assembler -- ISR should be as small as possible, so assembler
+ local int_exit -- labels for jumping
+
+ bcf INTCON_TMR0IF -- clear the timer 0 interrupt flag
+ movf bres_mid,f -- mid == 0 ?
+ btfsc STATUS_Z -- not zero?
+ decf bres_hi, f -- zero, borrow one from high byte
+ decfsz bres_mid, f -- this is the count of the interrupts
+ goto int_exit -- mid byte is not zero, so exit
+ movf bres_hi, f -- mid == 0, might hi == 0 too ?
+ btfss STATUS_Z
+ goto int_exit -- high byte not zero, so exit
+ -- high byte zero, mid also zero
+ -- we need to load the one-second timer
+
+ movlw hi -- add 2 000 000 to hi-mid-lo
+ movwf bres_hi -- hi & mid are both zero
+ movlw mid
+ movwf bres_mid
+ movlw lo -- lo is not zero, and must be added
+ addwf bres_lo, f -- bres_lo can overflow
+ btfsc STATUS_C -- does it?
+ incf bres_mid, f -- yes, but mid was 0x4B, so will not
overflow
+ incf seconds, f -- main routine should check seconds
+ -- and call calendar when seconds > 59
+ -- and take care of minutes, etc.
+ int_exit:
+ end assembler
end procedure -- end of ISR
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---