comparison code_part1/OSTC_code_asm_part1/MAIN.ASM @ 543:0def530863c2

Use faster return from ISR
author heinrichsweikamp
date Tue, 10 Jan 2012 21:55:13 +0100
parents f5a06b9e2fef
children 44e9b961f156
comparison
equal deleted inserted replaced
542:ca0e0efb1573 543:0def530863c2
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 44 ; movff BSR,0x102 ;save BSR register
45 ; movff STATUS,status_temp ;save STATUS register
46 ; movff WREG,wreg_temp ;save working register
45 movlb b'00000001' ;select Bank1 47 movlb b'00000001' ;select Bank1
46
47 movff STATUS,status_temp ;save STATUS register
48 movff WREG,wreg_temp ;save working register
49 movff PRODL,prod_temp+0 48 movff PRODL,prod_temp+0
50 movff PRODH,prod_temp+1 49 movff PRODH,prod_temp+1
51 50
52 movf PORTB,W ;move portb into latch register 51 movf PORTB,W ;move portb into latch register
53 52
66 btfsc INTCON3,INT1IF ; switch right 65 btfsc INTCON3,INT1IF ; switch right
67 call switch_right_int 66 call switch_right_int
68 67
69 movff prod_temp+1,PRODH 68 movff prod_temp+1,PRODH
70 movff prod_temp+0,PRODL 69 movff prod_temp+0,PRODL
71 movff wreg_temp,WREG ;restore working register 70 ; movff wreg_temp,WREG ;restore working register
72 movff status_temp,STATUS ;restore STATUS register 71 ; movff status_temp,STATUS ;restore STATUS register
73 movff 0x102,BSR ;restore BSR register 72 ; movff 0x102,BSR ;restore BSR register
74 retfie 73 retfie FAST
75 74
76 ;============================================================================= 75 ;=============================================================================
77 #include multilang_text.asm ; includes textmacros 76 #include multilang_text.asm ; includes textmacros
78 77
79 ;============================================================================= 78 ;=============================================================================