chiark / gitweb /
remove various debugging junk: all uses of xdebug removed (but not the xdebug memory...
[trains.git] / detpic / common.inc
index f54e81806781f949fa4a0d94ca42fffbcc0051a8..116c007b16f46e551c0512ead9114bef0d24dd17 100644 (file)
@@ -122,11 +122,48 @@ tickdiv_us equ tick_us * tickdiv
 @ macro
   endm
 
-D macro v
-       mov_lw  v
+;----------------------------------------
+; For adding a byte to the debug buffer.
+; Not for use in High ISR.  In all cases:
+;
+;  STATUS      any             trashed
+;  all others  any             preserved
+
+  ifndef NDEBUG
+;----------
+Dv macro  ; sorry, but assembler's dw directive isn't case-sensitive
+;
+;  W           message byte    preserved
+;
        call    debugbyte
        endm
 
+;----------
+Dl macro debug_literal_value
+;
+;  W           any             literal value as specified
+;
+       mov_lw  debug_literal_value
+       Dv
+       endm
+
+;----------
+Df macro debug_register_file_address
+;
+;  W           any             value from specified memory location
+;
+       mov_fw  debug_register_file_address
+       Dv
+       endm
+  else
+Dv macro
+   endm
+Dl macro debug_literal_value
+   endm
+Df macro debug_register_file_address
+   endm
+  endif
+
 ;----------------------------------------
 ; For entering and leaving Low ISR, saving and restoring STATUS and W
 ; See above under <something>_intrl, and {master,slave}_interrupt_low