chiark / gitweb /
various variable initialisations
authorian <ian>
Mon, 26 Dec 2005 12:57:56 +0000 (12:57 +0000)
committerian <ian>
Mon, 26 Dec 2005 12:57:56 +0000 (12:57 +0000)
detpic/detect.asm
detpic/i2clib.asm
detpic/mascan.asm
detpic/morse.messages
detpic/nmra-stream.asm
detpic/points.asm
detpic/program.asm
detpic/variables.asm

index 318b45d43ca3a63201a454e385a7bb38eaecbdcb..ca6aca8d5d2ec9a483edf172b92724dc151a342e 100644 (file)
@@ -130,6 +130,8 @@ detect_local_init
        set_f   scanc
        set_f   scand
        set_f   scane
+       set_f   last1
+       set_f   last2
        mov_ff  buf0_startval, buf0
 
        return
index e594532388740b06dd1212936d92ef0f858fb12b..2fb1cb06400eb2b763a4b022d32676aa32e57c0a 100644 (file)
@@ -57,8 +57,8 @@
 
                udata_acs
 
-sspstat                res     1
-sspcon1                res     1
+sspstat                res     1       ; master only
+sspcon1                res     1       ; master only
 sspcon2                res     1       ; master only
 slave          res     1       ; master only
 slave_next     res     1       ; master only
index df64cc2368ec879d8a33fd768a085bb2a4fbc4c5..32ea43d110ec7ca78444be9c18aec570ac205eac 100644 (file)
@@ -282,6 +282,7 @@ mascan_init
        mov_lw  slavetable & 0xff
        mov_wf  cslot
        clr_f   cbyte
+       bs_f    cbyte, cbyte_halted ; serial output of `hello' will start us up
        clr_f   wslave
 
        mov_lw  2
index e4a33f462a14ed936a1e4430f7c7cf11227b39de..63e96817e9865d9f58b454b6228883e09d995783 100644 (file)
@@ -65,6 +65,7 @@ UEC
 URM
 UCI
 UCP
+UPC
 USP
 
 # Messages for i2clib, S*
index 4bd54b52e8a1fddea75b49ea171c28b662c74ff3..1a35fdb268cebedd879e29fc597fab6ab096d073 100644 (file)
@@ -159,7 +159,7 @@ nmra_init
        clr_fa  fromserial      ; for loc'n of write-from-usart ptr in buffers
        clr_fa  totrack         ; for loc'n of send-to-track ptr in buffers
                                ; all in access bank
-
+       clr_f   acknmra
 
        debug   'c'     ; write 'c' to serial port
 ;----------------------------------------------------------------------------
index b7199bfe566abdd2c68bdecd2fba567db3535f10..77f35448d6d7c5931950033421aa8fc4618360cb 100644 (file)
@@ -234,6 +234,13 @@ point_timer_init_endif_masterslave
        return
 
 ;======================================================================
+; MASTER
+
+;----------------------------------------------------------------------
+points_master_init
+       clr_f   pointslave
+       clr_f   pointmsg
+       return
 
 ;----------------------------------------------------------------------
 command_point
@@ -259,6 +266,7 @@ command_point
        and_lw  0x06                    ; W =           0000 0ss0
        ior_wff pointslave              ; pointslave =  00SS Sss0
 
+       panic   morse_UPC ; should check that this slave exists
        rr_fw   pointslave              ; W =           000S SSss
        bra_nz  point_needwrite_yes
 
index 3a862fad3cbe09be4266017cdb3e93ca71c65d85..ee3ec3af3d8df77f553ddaf3acaa3fdc3ef5b68e 100644 (file)
@@ -26,6 +26,7 @@ vector_reset
        bs_f    RCON, IPEN      ; interrupt priorities
 
        call    idlocs_init
+       clr_f   flags
 
        bt_f_if0 idloc1,idloc1_master
        call    slave_init
@@ -70,6 +71,7 @@ master_init
        call    i2cm_init
        call    serialtxbuf_init
        call    polarity_master_init
+       call    points_master_init
        call    common_local_init
        call    serial_init
        call    nmra_init
index 38071edee3f87f17ff3808886784f72ed081ddc1..090d4791d3e140619d33fff7d0d0c870ccf43d40 100644 (file)
@@ -28,6 +28,7 @@ isr_high_save_fsr0    res     2 ; for isrh_fsr0_{save,restore}
 xdebug                 res     8
 
 cwslave                        res     1 ; slave we're currently actually writing to
+                                 ; undefined except in <something>_needwrite
 
 qqtrislat_start equ 0x50
 qqtrislat_section udata qqtrislat_start