bsf SPBRG,0,0
+ debug 0x0A ; LF to terminak
debug 'a' ; write 'a' to serial port
;----------------------------------------------------------------------------
incf FROMSERIAL,1,0 ; advance FROMSERIAL pointer by 1 byte
debug '3' ; write 'h' to serial port
; *** check for overrun and do something sensible
- btfss INDF0,7,0 ; check if bit 7 is set
+ btfsc INDF0,7,0 ; check if bit 7 is set
call advance_write_buffer ; if so, move to next buffer
debug '4' ; write 'h' to serial port
retfie 1
bnz read_from_buffer
bsf NMRACTRL,TRANSMITBIT,0
bsf NMRACTRL,NEXTACTION,0
- debug '3' ; write 'k' to serial port
+ debug '3'
retfie 1
read_from_buffer
- debug 'o' ; write 'o' to serial port
+ debug 'o'
; if currently on bit 7, want to skip to bit 6
;*** wouldn't it be easier to start on bit 6 ? :-) -iwj
btfsc TOTRACKBIT,7,0
- debug '4' ; write 'o' to serial port
+ debug '4'
btfsc TOTRACKBIT,7,0
rrncf TOTRACKBIT,1,0 ; rotate mask right
; set na=cb=bit value, advance bit (i.e. rotate TRANSMITBIT right),
; check if bit7, if so, advance byte, return
- debug 'p' ; write 'p' to serial port
+ debug 'p'
movff TOTRACK,FSR1L ; set low byte of IND1 pointer
movlw 5
movwf FSR1H,0 ; set high byte of IND1 pointer
movff TOTRACK,WREG ; copy TOTRACK pointer location to W
andlw 0xF ; investigate last 4 bits
+
+; GIONG WRONG HERE - should be klnoopqstu7895, missing out 78 = advance to next buffer
+; MUST advance byte before trying to advance buffer
+#
+
; if zero (i.e. overflowed to next buffer), branch to overflow check
bz totrack_overflow
bsf SPBRG,0,0
+ debug 0x0A ; LF to terminak
debug 'a' ; write 'a' to serial port
;----------------------------------------------------------------------------
incf FROMSERIAL,1,0 ; advance FROMSERIAL pointer by 1 byte
debug '3' ; write 'h' to serial port
; *** check for overrun and do something sensible
- btfss INDF0,7,0 ; check if bit 7 is set
+ btfsc INDF0,7,0 ; check if bit 7 is set
call advance_write_buffer ; if so, move to next buffer
debug '4' ; write 'h' to serial port
retfie 1
bnz read_from_buffer
bsf NMRACTRL,TRANSMITBIT,0
bsf NMRACTRL,NEXTACTION,0
- debug '3' ; write 'k' to serial port
+ debug '3'
retfie 1
read_from_buffer
- debug 'o' ; write 'o' to serial port
+ debug 'o'
; if currently on bit 7, want to skip to bit 6
;*** wouldn't it be easier to start on bit 6 ? :-) -iwj
btfsc TOTRACKBIT,7,0
- debug '4' ; write 'o' to serial port
+ debug '4'
btfsc TOTRACKBIT,7,0
rrncf TOTRACKBIT,1,0 ; rotate mask right
; set na=cb=bit value, advance bit (i.e. rotate TRANSMITBIT right),
; check if bit7, if so, advance byte, return
- debug 'p' ; write 'p' to serial port
+ debug 'p'
movff TOTRACK,FSR1L ; set low byte of IND1 pointer
movlw 5
movwf FSR1H,0 ; set high byte of IND1 pointer
movff TOTRACK,WREG ; copy TOTRACK pointer location to W
andlw 0xF ; investigate last 4 bits
+
+; GIONG WRONG HERE - should be klnoopqstu7895, missing out 78 = advance to next buffer
+; MUST advance byte before trying to advance buffer
+#
+
; if zero (i.e. overflowed to next buffer), branch to overflow check
bz totrack_overflow