From b64d1538d5e8565afe2238c04827786bfa20128d Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 1 Jan 2006 13:23:44 +0000 Subject: [PATCH] reserve ^ [^ ] for debugging insertions --- detpic/nmra-stream.asm | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/detpic/nmra-stream.asm b/detpic/nmra-stream.asm index 0421bfd..1331f23 100644 --- a/detpic/nmra-stream.asm +++ b/detpic/nmra-stream.asm @@ -24,40 +24,40 @@ clock equ mclock ; this part runs really only on master nmractrl res 1 ; state relevant to NMRA control transmitbit equ 7 ; bit 7: 0/1 bit currently being transmitted nextaction equ 6 ; bit 6: change polarity on next interrupt y/n - ; nmractrl is a bitmask, and only the bits above are used + ; nmractrl is a bitmask, and only the bits above are used fromserial res 1 ; from-serial buffer location (in buffer bank) totrack equ FSR2L ; to-track buffer location (in buffer bank) totrackbit res 1 ; bit location of pointer within byte - ; - ; buffers are each 16 bytes (this is hardwired) - ; and there are four of them starting at 0x500, 0x510, 0x520, 0x530. - ; plus a copy of the watchdog `stop everything' command at 0x540. - ; - ; fromserial and totrack are pointers into the buffer page - ; - ; fromserial points to the first empty byte, where we will put new - ; data provided by the host; this means that (fromserial & 0xf0) is - ; the first buffer which fails to contain a complete nmra message. - ; fromserial is updated only by the (low priority) serial receive - ; interrupt handler. Furthermore, it always maintains a correct - ; and valid value for use by the high-priority nmra readout ISR. - ; - ; totrack points to the first remaining full byte, which is currently - ; being transmitted; if nothing is currently being transmitted - ; because there is no nmra data at all then totrack points to the - ; start of the same buffer as fromserial - ; - ; We maintain the following properties, notionally: - ; - ; totrack <= fromserial < totrack - ; - ; \ \ - ; \ `- equal would mean overrun - ; \ - ; `- equal if we have nothing but - ; idle to trasmit - ; + ; + ; buffers are each 16 bytes (this is hardwired) + ; and there are four of them starting at 0x500, 0x510, 0x520, 0x530. + ; plus a copy of the watchdog `stop everything' command at 0x540. + ; + ; fromserial and totrack are pointers into the buffer page + ; + ; fromserial points to the first empty byte, where we will put new + ; data provided by the host; this means that (fromserial & 0xf0) is + ; the first buffer which fails to contain a complete nmra message. + ; fromserial is updated only by the (low priority) serial receive + ; interrupt handler. Furthermore, it always maintains a correct + ; and valid value for use by the high-priority nmra readout ISR. + ; + ; totrack points to the first remaining full byte, which is currently + ; being transmitted; if nothing is currently being transmitted + ; because there is no nmra data at all then totrack points to the + ; start of the same buffer as fromserial + ; + ; We maintain the following properties, notionally: + ; + ; totrack <= fromserial < totrack + ; + ; \ \ + ; \ `- equal would mean overrun + ; \ + ; `- equal if we have nothing but + ; idle to trasmit + ; bufferpage equ 5 -- 2.30.2