comparison code_part1/OSTC_code_asm_part1/MAIN.ASM @ 553:97b11ff4bcea

minor cleanup
author heinrichsweikamp
date Tue, 07 Feb 2012 13:26:41 +0100
parents 44e9b961f156
children e3ffc6d62a63
comparison
equal deleted inserted replaced
552:44e9b961f156 553:97b11ff4bcea
39 inter_asm code 0x0018 ;Low Priority Interrups 39 inter_asm code 0x0018 ;Low Priority Interrups
40 ; *** low priority interrupts not used 40 ; *** low priority interrupts not used
41 bra HighInt ;High Priority Interrups 41 bra HighInt ;High Priority Interrups
42 42
43 HighInt: 43 HighInt:
44 ; movff BSR,0x102 ;save BSR register
45 ; movff STATUS,status_temp ;save STATUS register
46 ; movff WREG,wreg_temp ;save working register
47 movlb b'00000001' ;select Bank1 44 movlb b'00000001' ;select Bank1
48 movff PRODL,prod_temp+0 45 movff PRODL,prod_temp+0
49 movff PRODH,prod_temp+1 46 movff PRODH,prod_temp+1
50 47
51 movf PORTB,W ;move portb into latch register 48 movf PORTB,W ; move portb into latch register
52 49
53 btfsc PIR1,TMR1IF ;Timer1 INT (external 32.768kHz Clock) 50 btfsc PIR1,TMR1IF ; Timer1 INT (external 32.768kHz Clock)
54 call timer1int 51 call timer1int
55 52
56 btfsc INTCON,TMR0IF ;Timer0 INT (Debounce Timer) 53 btfsc INTCON,TMR0IF ; Timer0 INT (Debounce Timer)
57 call timer0int 54 call timer0int
58 55
59 btfsc PIR1,RCIF ; UART 56 btfsc PIR1,RCIF ; UART
60 call uartint 57 call uartint
61 58
65 btfsc INTCON3,INT1IF ; switch right 62 btfsc INTCON3,INT1IF ; switch right
66 call switch_right_int 63 call switch_right_int
67 64
68 movff prod_temp+1,PRODH 65 movff prod_temp+1,PRODH
69 movff prod_temp+0,PRODL 66 movff prod_temp+0,PRODL
70 ; movff wreg_temp,WREG ;restore working register
71 ; movff status_temp,STATUS ;restore STATUS register
72 ; movff 0x102,BSR ;restore BSR register
73 retfie FAST 67 retfie FAST
74 68
75 ;============================================================================= 69 ;=============================================================================
76 #include multilang_text.asm ; includes textmacros 70 #include multilang_text.asm ; includes textmacros
77 71