chiark / gitweb /
Added debugging macro to nmra-stream.asm, to write debugging info out over
authorceb <ceb>
Mon, 3 Jan 2005 19:27:27 +0000 (19:27 +0000)
committerceb <ceb>
Mon, 3 Jan 2005 19:27:27 +0000 (19:27 +0000)
the serial port/.

cebpic/nmra-stream.asm
detpic/nmra-stream.asm

index 6d1592cfcb3acc25ac7fceb41c7c7e7cb4a82031..63d92f7859a7c3ddbb230583a56a51a22f169514 100644 (file)
@@ -36,6 +36,24 @@ TOTRACKBIT   equ     0x3     ; byte 3: bit location of pointer within byte
 
        code
 
+;*****************************************************************************************
+
+macros
+
+; macro to call subroutine to transmit over serial port for debugging
+; takes 8-bit value, puts in W, invokes debug_serial_transmit
+
+debug macro debugvalue
+       movlw   debugvalue
+       call    debug_serial_transmit
+       endm
+
+debug_serial_transmit
+       movwf   TXREG,0         ; move contents of W (i.e. debugvalue) to TXREG for transmission
+       return
+
+;*****************************************************************************************
+
 initialise
 
 ; serial set-up
index 6d1592cfcb3acc25ac7fceb41c7c7e7cb4a82031..63d92f7859a7c3ddbb230583a56a51a22f169514 100644 (file)
@@ -36,6 +36,24 @@ TOTRACKBIT   equ     0x3     ; byte 3: bit location of pointer within byte
 
        code
 
+;*****************************************************************************************
+
+macros
+
+; macro to call subroutine to transmit over serial port for debugging
+; takes 8-bit value, puts in W, invokes debug_serial_transmit
+
+debug macro debugvalue
+       movlw   debugvalue
+       call    debug_serial_transmit
+       endm
+
+debug_serial_transmit
+       movwf   TXREG,0         ; move contents of W (i.e. debugvalue) to TXREG for transmission
+       return
+
+;*****************************************************************************************
+
 initialise
 
 ; serial set-up