chiark / gitweb /
small changes to compile
authorceb <ceb>
Tue, 4 Jan 2005 22:42:16 +0000 (22:42 +0000)
committerceb <ceb>
Tue, 4 Jan 2005 22:42:16 +0000 (22:42 +0000)
cebpic/Makefile
cebpic/nmra-stream.asm
detpic/nmra-stream.asm

index aded8fcbba41d523a73e260338d8b0eeb5816834..11620f4159f72eb3fc3e0fc95ea52d33394115be 100644 (file)
@@ -1,4 +1,4 @@
-PROGRAMS=      led-flash send-serial reply-serial
+PROGRAMS=      led-flash send-serial reply-serial nmra-stream
 
 include ../pic.make
 
index c799e8c2fd353ea4a1bb86d6fd9bdceb06979cb1..39bbb4a676bc62d84bcbab1578ee8f6758535e69 100644 (file)
@@ -183,10 +183,10 @@ interrupt_low
 ;****************************************************************************
 
 serial_receive
-       movff   FROMSERIAL,FSR0L        ; set low byte of IND0 pointer
+       movff   FROMSERIAL,FSR0L        ; set low byte of INDF0 pointer
        movlw   5
-       movwf   FSR0H,0                 ; set high byte of IND0 pointer
-       movff   RCREG,IND             ; copy to received register
+       movwf   FSR0H,0                 ; set high byte of INDF0 pointer
+       movff   RCREG,INDF0             ; copy to received register
        incf    FROMSERIAL,1,0          ; advance FROMSERIAL pointer by 1 byte
 ; *** check for overrun and do something sensible
        btfss   RCREG,7,0               ; check if bit 7 is set
@@ -228,7 +228,7 @@ timer0_interrupt
        bcf     INTCON,2,0      ; clear interrupt-set bit
        movlw   0x01    ; (testing)
 ;      movlw   0x6E    ; (not-testing)
-       movwf   W,TMR0L         ; set timer0 to 0x6E (so interrupt takes 58us)
+       movwf   TMR0L,0         ; set timer0 to 0x6E (so interrupt takes 58us)
 
 
 ; check next action - if 0, change to 1 and return
@@ -263,7 +263,7 @@ decide_next_bit
 ; check whether current to-track buffer = current from-serial buffer
 ; if yes, transmit 1s (set transmitbit=1, nextaction=1 and return)
 
-       movff   FROMSERIAL,W,0
+       movff   FROMSERIAL,W
        xorwf   TOTRACK,0,0
        andlw   0x30
        bnz     read_from_buffer
@@ -287,7 +287,7 @@ read_from_buffer
        movff   TOTRACK,FSR1L           ; set low byte of IND1 pointer
        movlw   5
        movwf   FSR1H,0                 ; set high byte of IND1 pointer
-       movff   INDF1,W,0
+       movff   INDF1,W
        andwf   TOTRACKBIT,0,0          ; mask out bit to be transmitted
 ;*** to `mask out' means to clear, eg
 ;*** if you were to `mask out bit 0 of 0xff' you'd get 0xfe
@@ -331,7 +331,7 @@ advance_pointer
        movff   TOTRACK,FSR1L   
        movlw   5
        movwf   FSR1H,0         
-       movff   INDF1,W,0
+       movff   INDF1,W
        andlw   0x80
 ;*** bit test bit 7 of INDF1 ?  That's simpler than load into W and AND. -iwj
 
@@ -384,7 +384,7 @@ advance_read_byte
        movff   TOTRACK,FSR1L           ; set low byte of IND1 pointer
        movlw   5
        movwf   FSR1H,0                 ; set high byte of IND1 pointer
-       movff   INDF1,W,0
+       movff   INDF1,W
        andwf   TOTRACKBIT,0,0          ; mask out bit to be transmitted
 ;*** This is the same code as the 2nd stanza in read_from_buffer,
 ;*** above.  Surely it should be made common (eg a subroutine) ? -iwj
index c799e8c2fd353ea4a1bb86d6fd9bdceb06979cb1..39bbb4a676bc62d84bcbab1578ee8f6758535e69 100644 (file)
@@ -183,10 +183,10 @@ interrupt_low
 ;****************************************************************************
 
 serial_receive
-       movff   FROMSERIAL,FSR0L        ; set low byte of IND0 pointer
+       movff   FROMSERIAL,FSR0L        ; set low byte of INDF0 pointer
        movlw   5
-       movwf   FSR0H,0                 ; set high byte of IND0 pointer
-       movff   RCREG,IND             ; copy to received register
+       movwf   FSR0H,0                 ; set high byte of INDF0 pointer
+       movff   RCREG,INDF0             ; copy to received register
        incf    FROMSERIAL,1,0          ; advance FROMSERIAL pointer by 1 byte
 ; *** check for overrun and do something sensible
        btfss   RCREG,7,0               ; check if bit 7 is set
@@ -228,7 +228,7 @@ timer0_interrupt
        bcf     INTCON,2,0      ; clear interrupt-set bit
        movlw   0x01    ; (testing)
 ;      movlw   0x6E    ; (not-testing)
-       movwf   W,TMR0L         ; set timer0 to 0x6E (so interrupt takes 58us)
+       movwf   TMR0L,0         ; set timer0 to 0x6E (so interrupt takes 58us)
 
 
 ; check next action - if 0, change to 1 and return
@@ -263,7 +263,7 @@ decide_next_bit
 ; check whether current to-track buffer = current from-serial buffer
 ; if yes, transmit 1s (set transmitbit=1, nextaction=1 and return)
 
-       movff   FROMSERIAL,W,0
+       movff   FROMSERIAL,W
        xorwf   TOTRACK,0,0
        andlw   0x30
        bnz     read_from_buffer
@@ -287,7 +287,7 @@ read_from_buffer
        movff   TOTRACK,FSR1L           ; set low byte of IND1 pointer
        movlw   5
        movwf   FSR1H,0                 ; set high byte of IND1 pointer
-       movff   INDF1,W,0
+       movff   INDF1,W
        andwf   TOTRACKBIT,0,0          ; mask out bit to be transmitted
 ;*** to `mask out' means to clear, eg
 ;*** if you were to `mask out bit 0 of 0xff' you'd get 0xfe
@@ -331,7 +331,7 @@ advance_pointer
        movff   TOTRACK,FSR1L   
        movlw   5
        movwf   FSR1H,0         
-       movff   INDF1,W,0
+       movff   INDF1,W
        andlw   0x80
 ;*** bit test bit 7 of INDF1 ?  That's simpler than load into W and AND. -iwj
 
@@ -384,7 +384,7 @@ advance_read_byte
        movff   TOTRACK,FSR1L           ; set low byte of IND1 pointer
        movlw   5
        movwf   FSR1H,0                 ; set high byte of IND1 pointer
-       movff   INDF1,W,0
+       movff   INDF1,W
        andwf   TOTRACKBIT,0,0          ; mask out bit to be transmitted
 ;*** This is the same code as the 2nd stanza in read_from_buffer,
 ;*** above.  Surely it should be made common (eg a subroutine) ? -iwj