chiark / gitweb /
lasttelldone documented but not implemented
authorian <ian>
Sun, 25 Dec 2005 13:03:06 +0000 (13:03 +0000)
committerian <ian>
Sun, 25 Dec 2005 13:03:06 +0000 (13:03 +0000)
detpic/nmra-stream.asm

index 213d5ac0de3cd353453663d71151d74b1fb741f3..9d816cb60b442ddaf9a544bbecfe29364aae2470 100644 (file)
@@ -29,6 +29,7 @@ nextaction    equ     6       ; bit 6: change polarity on next interrupt y/n
 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
+lasttelldone   res     1       ; last nmra msg we've told host we've finished
  ;
  ; buffers are each 16 bytes (this is hardwired)
  ; and there are four of them starting at 0x500, 0x510, 0x520, 0x530.
@@ -46,6 +47,20 @@ totrackbit   res     1       ; bit location of pointer within byte
  ; 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
+ ;
+ ; lasttelldone points to the last buffer whose complete transmission
+ ; we've reported to the host.
+ ;
+ ; We maintain the following properties, notionally:
+ ;
+ ;  lasttelldone <= totrack <= fromserial < lasttelldone
+ ;                           
+ ;              /             \
+ ;             '               `- equal if we have nothing but
+ ;  equal if we have               idle to trasmit
+ ;  told the host about our
+ ;  current buffer state
+ ;
 
 bufferpage     equ     5