From 35d24814381fffb6718b5394b64e45eba3868193 Mon Sep 17 00:00:00 2001 From: ceb Date: Mon, 3 Jan 2005 19:27:27 +0000 Subject: [PATCH] Added debugging macro to nmra-stream.asm, to write debugging info out over the serial port/. --- cebpic/nmra-stream.asm | 18 ++++++++++++++++++ detpic/nmra-stream.asm | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/cebpic/nmra-stream.asm b/cebpic/nmra-stream.asm index 6d1592c..63d92f7 100644 --- a/cebpic/nmra-stream.asm +++ b/cebpic/nmra-stream.asm @@ -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 diff --git a/detpic/nmra-stream.asm b/detpic/nmra-stream.asm index 6d1592c..63d92f7 100644 --- a/detpic/nmra-stream.asm +++ b/detpic/nmra-stream.asm @@ -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 -- 2.30.2