diff code_part1/OSTC_code_asm_part1/definitions.asm @ 522:e33a8ac4b660

New ASSERT_BANK1 macro for software proofing.
author JeanDo
date Fri, 09 Dec 2011 20:43:43 +0100
parents a73a452ca155
children d445f0627e86
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm	Fri Dec 09 20:43:39 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/definitions.asm	Fri Dec 09 20:43:43 2011 +0100
@@ -358,6 +358,21 @@
 desaturation_time_buffer res 2	; buffer for desat time
 total_divetime_seconds	res 2	; counts dive seconds regardless of CF01 (18h max.)
 
+ASSERT_BANK1    MACRO   tag
+    Ifdef   __DEBUG
+        local @end
+        movlw   1
+        xorwf   BSR,W
+        bz      @end
+        
+        movlw   low(tag)
+        movff   WREG,temp10+0
+        movlw   high(tag)
+        movff   WREG,temp10+0
+        call    PLED_resetdebugger
+@end:
+    Endif
+    ENDM
 ;=============================================================================
 ; C-code Routines
 ; PART 2