diff 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
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/MAIN.ASM	Fri Dec 10 02:35:26 2010 +0100
+++ b/code_part1/OSTC_code_asm_part1/MAIN.ASM	Sat Dec 11 09:57:42 2010 +0100
@@ -47,6 +47,8 @@
 		
 		movff	STATUS,status_temp			;save STATUS register
 		movff	WREG,wreg_temp				;save working register
+		movff   PRODL,prod_temp+0
+		movff   PRODH,prod_temp+1
 
 		movf	PORTB,W						;move portb into latch register
 
@@ -68,6 +70,8 @@
 		btfsc	INTCON3,INT1IF				; switch right
 		call	schalter_rechts
 
+		movff   prod_temp+1,PRODH
+		movff   prod_temp+0,PRODL
 		movff	wreg_temp,WREG				;restore working register
 		movff	status_temp,STATUS			;restore STATUS register
 		movff	0x102,BSR					;restore BSR register