comparison code_part1/OSTC_code_asm_part1/isr.asm @ 266:ba109a7948df

OSTC 2N uses exchanged switches...
author heinrichsweikamp
date Tue, 12 Apr 2011 08:11:50 +0200
parents dee88c962653
children 4ec488f046f4
comparison
equal deleted inserted replaced
265:ab8ce7de2b46 266:ba109a7948df
85 bcf INTCON,INT0IF ; Clear flag 85 bcf INTCON,INT0IF ; Clear flag
86 86
87 btfsc T0CON,TMR0ON ; Timer0 running? 87 btfsc T0CON,TMR0ON ; Timer0 running?
88 bra timer0_restart ; Yes, restart 88 bra timer0_restart ; Yes, restart
89 89
90 ; OSTC 2N has flipped screen and exchanged switches...
91 movff win_flags,WREG ; Get into Bank0
92 btfss WREG,0
90 bsf switch_left ; Set flag, button press is OK 93 bsf switch_left ; Set flag, button press is OK
94 btfsc WREG,0
95 bsf switch_right ; Set flag, button press is OK
91 96
92 bsf T0CON,TMR0ON ; Start Timer 0 97 bsf T0CON,TMR0ON ; Start Timer 0
93 return 98 return
94 99
95 100
97 bcf INTCON3,INT1IF ; Clear flag 102 bcf INTCON3,INT1IF ; Clear flag
98 103
99 btfsc T0CON,TMR0ON ; Timer0 running? 104 btfsc T0CON,TMR0ON ; Timer0 running?
100 bra timer0_restart ; Yes, restart 105 bra timer0_restart ; Yes, restart
101 106
107 ; OSTC 2N has flipped screen and exchanged switches...
108 movff win_flags,WREG ; Get into Bank0
109 btfsc WREG,0
110 bsf switch_left ; Set flag, button press is OK
111 btfss WREG,0
102 bsf switch_right ; Set flag, button press is OK 112 bsf switch_right ; Set flag, button press is OK
103 113
104 bsf T0CON,TMR0ON ; Start Timer 0 114 bsf T0CON,TMR0ON ; Start Timer 0
105 return 115 return
106 116