Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/MAIN.ASM @ 92:82de387d6e7c
Interrupt trashes the PRODH:L registers.
author | JeanDo |
---|---|
date | Sat, 11 Dec 2010 09:57:42 +0100 |
parents | 3e351e25f5d1 |
children | dc349e4264bb |
comparison
equal
deleted
inserted
replaced
91:3bcccb697bce | 92:82de387d6e7c |
---|---|
45 movff BSR,0x102 ;save BSR register | 45 movff BSR,0x102 ;save BSR register |
46 movlb b'00000001' ;select Bank1 | 46 movlb b'00000001' ;select Bank1 |
47 | 47 |
48 movff STATUS,status_temp ;save STATUS register | 48 movff STATUS,status_temp ;save STATUS register |
49 movff WREG,wreg_temp ;save working register | 49 movff WREG,wreg_temp ;save working register |
50 movff PRODL,prod_temp+0 | |
51 movff PRODH,prod_temp+1 | |
50 | 52 |
51 movf PORTB,W ;move portb into latch register | 53 movf PORTB,W ;move portb into latch register |
52 | 54 |
53 btfsc PIR1,TMR1IF ;Timer1 INT (external 32.768kHz Clock) | 55 btfsc PIR1,TMR1IF ;Timer1 INT (external 32.768kHz Clock) |
54 call timer1int | 56 call timer1int |
66 call schalter_links | 68 call schalter_links |
67 | 69 |
68 btfsc INTCON3,INT1IF ; switch right | 70 btfsc INTCON3,INT1IF ; switch right |
69 call schalter_rechts | 71 call schalter_rechts |
70 | 72 |
73 movff prod_temp+1,PRODH | |
74 movff prod_temp+0,PRODL | |
71 movff wreg_temp,WREG ;restore working register | 75 movff wreg_temp,WREG ;restore working register |
72 movff status_temp,STATUS ;restore STATUS register | 76 movff status_temp,STATUS ;restore STATUS register |
73 movff 0x102,BSR ;restore BSR register | 77 movff 0x102,BSR ;restore BSR register |
74 retfie | 78 retfie |
75 | 79 |