# HG changeset patch # User JeanDo # Date 1292057862 -3600 # Node ID 82de387d6e7c28523da39bca3d879b8410eb2e8d # Parent 3bcccb697bce030c517d7329fd026ff252a1f2ad Interrupt trashes the PRODH:L registers. diff -r 3bcccb697bce -r 82de387d6e7c code_part1/OSTC_code_asm_part1/MAIN.ASM --- a/code_part1/OSTC_code_asm_part1/MAIN.ASM Fri Dec 10 02:35:26 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/MAIN.ASM Sat Dec 11 09:57:42 2010 +0100 @@ -47,6 +47,8 @@ movff STATUS,status_temp ;save STATUS register movff WREG,wreg_temp ;save working register + movff PRODL,prod_temp+0 + movff PRODH,prod_temp+1 movf PORTB,W ;move portb into latch register @@ -68,6 +70,8 @@ btfsc INTCON3,INT1IF ; switch right call schalter_rechts + movff prod_temp+1,PRODH + movff prod_temp+0,PRODL movff wreg_temp,WREG ;restore working register movff status_temp,STATUS ;restore STATUS register movff 0x102,BSR ;restore BSR register diff -r 3bcccb697bce -r 82de387d6e7c code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Fri Dec 10 02:35:26 2010 +0100 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Sat Dec 11 09:57:42 2010 +0100 @@ -117,6 +117,7 @@ wreg_temp ;variables used for context saving during ISR status_temp bsr_temp + prod_temp:2 ;Trashed by isr_mult16x16, for sensor compensations secs ;realtime clock mins @@ -338,9 +339,6 @@ convert_value_temp:3 ; used in menu_battery_state_convert_date box_temp:5 time_correction_value ; Adds to Seconds on midnight - - ; [jDG] printf variable: - printf_len ; save TBLPTR during wordprocessor ENDC ifndef AAFONTS