chiark / gitweb /
make it compile again (but not yet link)
authorian <ian>
Sun, 25 Dec 2005 23:24:24 +0000 (23:24 +0000)
committerian <ian>
Sun, 25 Dec 2005 23:24:24 +0000 (23:24 +0000)
12 files changed:
detpic/Makefile
detpic/final.inc
detpic/mascan.asm
detpic/mascan.fin
detpic/morse.messages
detpic/points.fin
detpic/reverse.asm
detpic/reverse.fin
detpic/serout.asm
detpic/serout.fin
detpic/tick.fin [new file with mode: 0644]
detpic/variables.asm

index 7da6979eb8f0d4c641f1392a39308468a9b2bc6b..1604c08f424bdef218954ace57d3f02a5149eefd 100644 (file)
@@ -30,6 +30,7 @@ INCLUDES=                                     \
                reverse.fin                     \
                routines-led.fin                \
                serout.fin                      \
+               tick.fin                        \
                vectors.fin                     \
 
 VARSFILES=     variables
index 5b31b799ae146c13f932ceaa46e63d98e1edf82f..24a2dabf86e6072c01dac04108c22abd472ce8e7 100644 (file)
@@ -11,6 +11,7 @@
  include reverse.fin
  include routines-led.fin
  include serout.fin
+ include tick.fin
  include variables+vars.fin
  include vectors.fin
 
index 69c316f926aa11d228668d9a0e177674be5b92dd..df64cc2368ec879d8a33fd768a085bb2a4fbc4c5 100644 (file)
@@ -26,7 +26,7 @@ outmsg_targetlen      res 1 ;
 
 near_getwritebyteyes code
 ;----------------------------------------
-getwritebyte_yes
+i2c_getwritebyte_yes
        pop             ; we don't care where we were in i2cmu_write_next_byte
        bc_f    STATUS, Z       ; yes, we want to write this byte
        return          ; from i2cmu_write_next_byte
@@ -35,8 +35,8 @@ getwritebyte_yes
 ;----------------------------------------
 i2cmu_write_next_byte
        ; add calls to getwritebyte_<foo> here:
-       call    getwritebyte_polarity
-       call    getwritebyte_points
+       call    polarity_getwritebyte
+       call    points_getwritebyte
        ; end of list of calls to getwritebyte_<foo>
        ; so, no-one wants this slave:
        bs_f    STATUS, Z
@@ -217,7 +217,7 @@ nextslave_nowrite
        mov_lw  ste_size
        add_wff cslot           ; cslot -> next ste_flags
        mov_lfsr slavetable, 1  ; FSR1H -> slavetable
-       mov_fw  cslot, FSR1L    ; FSR1 -> new ste_flags
+       mov_ff  cslot, FSR1L    ; FSR1 -> new ste_flags
 
        bt_f_if1 POSTDEC1, stf_sentinel ; FSR1 -> ste_slave
        bra     nextslave_looparound
@@ -243,8 +243,8 @@ i2cmu_done
 
        ; Anyone else to write to ?
        ; add calls to needwrite_<foo> here:
-       call    needwrite_polarity
-       call    needwrite_points
+       call    polarity_needwrite
+       call    points_needwrite
        ; end of list of calls to needwrite_<foo>
 
        ; no, if we're here, no-one wants to write
@@ -325,7 +325,7 @@ mascan_init_ifabsent
        bra     mascan_init_loop
        ; we've read the whole flash table
 
- if slavetable = 0x400
+ if slavetable == 0x400
        bt_f_if1 FSR0H, 0
        bra     mascan_bad_toomany
  endif
index ddd160a68ef02e5faa14708dbdb6da5b933d1c81..e94964066f7f1f8e2f7751a4da992c39c1e87379 100644 (file)
@@ -1,2 +1,6 @@
  extern i2cm_intrl
+ extern mascan_init
  extern loopback_read_byte
+ extern i2c_needwrite
+ extern i2c_consider_restartread
+ extern i2c_getwritebyte_yes
index c4b4cd9cd9d439f9dd947c2158988e4de0ade590..9491ae6a152bcf11ab5f580232793f4e9fdebbc9 100644 (file)
@@ -83,7 +83,7 @@ DX    ::t                             ; slave received wrong message byte
 DB     detect:message_buffer           ; slave_add_short_message overrun
 DF     ::t                             ; slave pic2detinfo[0] invalid bits
 DG     ::t                             ; too many slaves in pic2detinfo
-DM     ::buf0                          : master has MM bit set in buf0
+DM     ::buf0                          ; master has MM bit set in buf0
 
 # Messages for specific peripherals:
 # R - Reversers (polarity)
index cd4679c9aff7f35d14a87ce2ee29a20f355ca9d8..f17c081d7ea9df57b616b430f87d4ad7006706bc 100644 (file)
@@ -2,5 +2,7 @@
  extern point_local_do
  extern points_local_init
  extern points_local_intrl
+ extern points_needwrite
+ extern points_getwritebyte
  extern cdu_init
  extern got_pointed
index c52fe160915e0bf4b7ab43add1684e7214d4cd0c..e2318cd37e37371da18535d2722822f58427f7f2 100644 (file)
@@ -166,7 +166,7 @@ board_next_none
 
        mov_fw  polarity_cmds ; there's always a board 0, us
        call    polarity_local_do
-       rcall   needwrite_polarity ; does `return' because it will find one
+       rcall   polarity_needwrite ; does `return' because it will find one
        return                     ; ... or maybe not if only 1 rev board
 
 ;----------
@@ -179,7 +179,7 @@ polarity_master_init
        ; need to set up polarity_cmds
 
 ;----------------------------------------------------------------------
-needwrite_polarity
+polarity_needwrite
 ;  needwrite_<something> will see if we need to talk to a slave
 ;    if not it will simply return
 ;    if we _do_, it will put the slave no. in W, and then pop
@@ -203,7 +203,7 @@ polarity_needwrite_loop
 
 near_getwritebyteyes code
 ;----------------------------------------------------------------------
-getwritebyte_polarity
+polarity_getwritebyte
 ;  getwritebyte_<something> finds a byte to write to a particular
 ;   slave.  If we have something to write, puts the byte in W
 ;   and does `goto getwritebyte_yes'.  Otherwise simply returns.
@@ -213,9 +213,10 @@ getwritebyte_polarity
 ;  W           undefined               trashed         byte for slave
 ;
        mov_lfsr polarity_cmds, 0
-       add_wf  FSR0L
+       mov_fw  cwslave
+       add_wff FSR0L
        mov_fw  INDF0
-       bra_n   getwritebyte_yes
+       bra_n   i2c_getwritebyte_yes
        ; no:
        return
 
index 1b7d8ed6749ea84737040b3715c1dc4353af2570..fc313d49679f6ec6ec39737697b4c5ceee7b9950 100644 (file)
@@ -1,3 +1,6 @@
  extern command_polarity
  extern polarity_local_do
  extern polarity_local_init
+ extern polarity_master_init
+ extern polarity_needwrite
+ extern polarity_getwritebyte
index 33d9b2b6bd5ee21d2b7ee4ea60fcd6e7e7669b0d..6bf7cdebce42c9b535156bd48bf654f50c2de50a 100644 (file)
@@ -102,7 +102,7 @@ tx_fcdisable
 serialtxfc_init
        bs_f    INTCON, RBIE
        bc_f    INTCON2, RBIP
-       rcall   porb_read
+       rcall   portb_read
        return
 
 ;----------------------------------------------------------------------
index ea6077920a83a3a6d7c869981c277f256d050455..894bd57e6d522c756d25ec908d5313aa354035c9 100644 (file)
@@ -1,2 +1,6 @@
  extern serial_addbyte
  extern serial_addbyte_another
+ extern serialtx_intrl
+ extern serialtxfc_init
+ extern serialtxbuf_init
+ extern portb_read
diff --git a/detpic/tick.fin b/detpic/tick.fin
new file mode 100644 (file)
index 0000000..7cf7f0c
--- /dev/null
@@ -0,0 +1 @@
+ extern ticker_intrl
index 0a655aae1603ff38e1203d68e878544b4de5a0f3..38071edee3f87f17ff3808886784f72ed081ddc1 100644 (file)
@@ -56,11 +56,12 @@ outbuf              res     outbuf_size
 bitnum2bit_section udata 0x0f8
 bitnum2bit     res     8       ; bitnum2bit[x] = 1<<x
 
-slavetable_section udata 0x400
+slavetable equ 0x400
+slavetable_section udata slavetable
 ; each board actually present has an entry in this table
 ste_szln2      equ     3
 ste_size       equ     (1<<ste_szln2)
-slavetable res maxpics * ste_size
+ res maxpics * ste_size
 
 ; each entry is a number of bytes, at these offsets:
 ste_slave      equ 0 ; Gk slave number