comparison code_part1/OSTC_code_asm_part1/MAIN.ASM @ 377:be71e563ac09 64kByte Logbook

First gas can be reset to 0m, test for timer1 race condition
author heinrichsweikamp
date Mon, 13 Jun 2011 07:45:59 +0200
parents b5b030c1ae7e
children 51baf8777b73
comparison
equal deleted inserted replaced
376:ed26990716fe 377:be71e563ac09
65 btfsc INTCON,INT0IF ; Switch left 65 btfsc INTCON,INT0IF ; Switch left
66 call switch_left_int 66 call switch_left_int
67 67
68 btfsc INTCON3,INT1IF ; switch right 68 btfsc INTCON3,INT1IF ; switch right
69 call switch_right_int 69 call switch_right_int
70
71 ; Test for race condition
72 btfsc PIR1,TMR1IF ;Timer1 INT (external 32.768kHz Clock)
73 call timer1int
70 74
71 movff prod_temp+1,PRODH 75 movff prod_temp+1,PRODH
72 movff prod_temp+0,PRODL 76 movff prod_temp+0,PRODL
73 movff wreg_temp,WREG ;restore working register 77 movff wreg_temp,WREG ;restore working register
74 movff status_temp,STATUS ;restore STATUS register 78 movff status_temp,STATUS ;restore STATUS register